private int getRealIndex ( int index ) { int idx = index ; if ( idx < 0 ) { if ( Math . abs ( idx ) <= this . size ( ) ) { idx = this . size ( ) + idx ; } else { logger . error ( "negative number {} is too large: results size is {}, maximum admitted value is {}" , index , this . size ( ) , - 1 * this . size ( ) + 1 ) ; throw new IndexOutOfBoundsException ( "Negative index is too large" ) ; } } return idx ; }
Returns the positive value corresponding to the given positive or negative index value .