public int element ( int i ) throws InvalidRangeException { if ( i < 0 ) throw new InvalidRangeException ( "i must be >= 0" ) ; if ( i >= length ) throw new InvalidRangeException ( "i must be < length" ) ; return first + i * stride ; }
Get ith element