Package org.apache.sis.math
Class ArrayVector.UnsignedLongs
java.lang.Object
java.util.AbstractCollection<Number>
java.util.AbstractList<Number>
org.apache.sis.math.Vector
org.apache.sis.math.ArrayVector<Long>
org.apache.sis.math.ArrayVector.Longs
org.apache.sis.math.ArrayVector.UnsignedLongs
- All Implemented Interfaces:
Serializable
,Iterable<Number>
,Collection<Number>
,List<Number>
,RandomAccess
,SequencedCollection<Number>
,CheckedContainer<Long>
- Enclosing class:
ArrayVector<E extends Number>
A vector backed by an array of type
long[]
to be interpreted as unsigned values.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.math.ArrayVector
ArrayVector.Decimal, ArrayVector.Doubles
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
For cross-version compatibility.Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
doubleValue
(int index) Returns the unsigned long as adouble
value.float
floatValue
(int index) Returns the unsigned long as afloat
value.boolean
Declares this vector as unsigned.long
longValue
(int index) Returns the unsigned long as along
value, if possible.(package private) NumberRange
<Double> range
(IntSupplier indices, int n) Finds the minimum and maximum values in the array or in a subset of the array.stringValue
(int index) Returns the string representation at the given index.Methods inherited from class org.apache.sis.math.ArrayVector.Longs
buffer, equals, fill, get, getElementType, hashCode, increment, indexOf, isEmptyOrNaN, isInteger, isSinglePrecision, set, size
Methods inherited from class org.apache.sis.math.ArrayVector
compress, compress, isNaN, newInstance, verifyType
Methods inherited from class org.apache.sis.math.Vector
backingVector, byteValue, compress, concatenate, copy, create, create, createConcatenate, createForDecimal, createSequence, createSequence, createSubSampling, createTransform, doubleValues, equals, floatValues, intValue, pick, range, repeat, repetitions, reverse, shortValue, subList, subSampling, subtract, toBacking, toString, transform, warning
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, toArray, toArray
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
-
Constructor Details
-
UnsignedLongs
UnsignedLongs(long[] array) Creates a new vector for the given array.
-
-
Method Details
-
isUnsigned
public boolean isUnsigned()Declares this vector as unsigned.- Overrides:
isUnsigned
in classVector
- Returns:
true
if the integer values shall be interpreted as unsigned values.
-
doubleValue
public double doubleValue(int index) Returns the unsigned long as adouble
value.- Overrides:
doubleValue
in classArrayVector.Longs
- Parameters:
index
- the index in the [0 … size-1] range.- Returns:
- the value at the given index.
- See Also:
-
floatValue
public float floatValue(int index) Returns the unsigned long as afloat
value.- Overrides:
floatValue
in classArrayVector.Longs
- Parameters:
index
- the index in the [0 … size-1] range.- Returns:
- the value at the given index.
- See Also:
-
longValue
public long longValue(int index) Returns the unsigned long as along
value, if possible.- Overrides:
longValue
in classArrayVector.Longs
- Parameters:
index
- the index in the [0 … size-1] range.- Returns:
- the value at the given index.
-
stringValue
Returns the string representation at the given index.- Overrides:
stringValue
in classArrayVector.Longs
- Parameters:
index
- the index in the [0 … size-1] range.- Returns:
- a string representation of the value at the given index (may be
null
). - See Also:
-
range
Finds the minimum and maximum values in the array or in a subset of the array.- Overrides:
range
in classArrayVector.Longs
- Parameters:
indices
- supplier of indices of the values to examine for computing the range, ornull
for the 0, 1, 2, … n-1 sequence.n
- number of indices to get from the supplier.- Returns:
- the range of all values at the given indices.
-