Package com.google.common.geometry
Interface PrimitiveArrays.Longs
-
- Enclosing class:
- PrimitiveArrays
static interface PrimitiveArrays.Longs
An array oflong
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
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static 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[]
toIntArray()
Decodes and returns this array as anint[]
.
-
-
-
Method Detail
-
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 <Integer.MIN_VALUE
or >Integer.MAX_VALUE
.
-
-