Class ArrayVector.UnsignedLongs

All Implemented Interfaces:
Serializable, Iterable<Number>, Collection<Number>, List<Number>, RandomAccess, CheckedContainer<Long>
Enclosing class:
ArrayVector<E extends Number>

private static final class ArrayVector.UnsignedLongs extends ArrayVector.Longs
A vector backed by an array of type long[] to be interpreted as unsigned values.
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For 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 class Vector
      Returns:
      true if the integer values shall be interpreted as unsigned values.
    • doubleValue

      public double doubleValue(int index)
      Returns the unsigned long as a double value.
      Overrides:
      doubleValue in class ArrayVector.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 a float value.
      Overrides:
      floatValue in class ArrayVector.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 a long value, if possible.
      Overrides:
      longValue in class ArrayVector.Longs
      Parameters:
      index - the index in the [0 … size-1] range.
      Returns:
      the value at the given index.
    • stringValue

      public String stringValue(int index)
      Returns the string representation at the given index.
      Overrides:
      stringValue in class ArrayVector.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

      NumberRange<Double> range(IntSupplier indices, int n)
      Finds the minimum and maximum values in the array or in a subset of the array.
      Overrides:
      range in class ArrayVector.Longs
      Parameters:
      indices - supplier of indices of the values to examine for computing the range, or null 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.