Package com.google.common.geometry
Interface PrimitiveArrays.Longs
- Enclosing class:
PrimitiveArrays
static interface PrimitiveArrays.Longs
An array of
longs.
Implementations will be thread-safe if the underlying data is not mutated. Users should ensure the underlying data is not mutated in order to get predictable behaviour. Any buffering should be done internally.
-
Method Summary
Modifier and TypeMethodDescriptionstatic PrimitiveArrays.LongsfromImmutableLongArray(com.google.common.primitives.ImmutableLongArray immutableLongArray) Returns aPrimitiveArrays.LongswrappingimmutableLongArray.longget(int position) Returns thelongat positionposition.intlength()Returns the length of this array.default int[]Decodes and returns this array as anint[].
-
Method Details
-
get
long get(int position) Returns thelongat positionposition.Throws an
IndexOutOfBoundsExceptionif the absolute get on the underlying implementation fails. -
length
int length()Returns the length of this array. -
fromImmutableLongArray
static PrimitiveArrays.Longs fromImmutableLongArray(com.google.common.primitives.ImmutableLongArray immutableLongArray) Returns aPrimitiveArrays.LongswrappingimmutableLongArray. -
toIntArray
default int[] toIntArray()Decodes and returns this array as anint[].Throws an
IllegalArgumentExceptionif any value in this array is invalid input: '<'Integer.MIN_VALUEor >Integer.MAX_VALUE.
-