Package com.google.common.geometry
Interface PrimitiveArrays.Longs
- Enclosing class:
PrimitiveArrays
static interface PrimitiveArrays.Longs
An array of
long
s.
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.Longs
fromImmutableLongArray
(com.google.common.primitives.ImmutableLongArray immutableLongArray) Returns aPrimitiveArrays.Longs
wrappingimmutableLongArray
.long
get
(int position) Returns thelong
at positionposition
.int
length()
Returns the length of this array.default int[]
Decodes and returns this array as anint[]
.
-
Method Details
-
get
long get(int position) Returns thelong
at positionposition
.Throws an
IndexOutOfBoundsException
if 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.Longs
wrappingimmutableLongArray
. -
toIntArray
default int[] toIntArray()Decodes and returns this array as anint[]
.Throws an
IllegalArgumentException
if any value in this array is invalid input: '<'Integer.MIN_VALUE
or >Integer.MAX_VALUE
.
-