public long getPrimitive ( int index ) { if ( index < 0 || index >= maxLength ) { throw new ArrayIndexOutOfBoundsException ( "invalid index: " + index ) ; } int pos = Arrays . binarySearch ( indices , index ) ; long value = ( pos >= 0 ) ? values [ pos ] : 0 ; return value ; }
Retrieve the value at specified index or 0 if no value had been specified .