Interface Vector<VECTOR_TYPE extends Vector<VECTOR_TYPE>>

All Superinterfaces:
LongSizedDataStructure, Serializable
All Known Subinterfaces:
ByteVector, CharVector, DoubleVector, FloatVector, IntVector, LongVector, ObjectVector<COMPONENT_TYPE>, ShortVector
All Known Implementing Classes:
ByteRingBufferVectorWrapper, ByteSegmentedSortedMultiset, ByteSubVector, ByteVector.Indirect, ByteVectorColumnWrapper, ByteVectorDirect, ByteVectorSlice, CharRingBufferVectorWrapper, CharSegmentedSortedMultiset, CharSubVector, CharVector.Indirect, CharVectorColumnWrapper, CharVectorDirect, CharVectorSlice, DoubleRingBufferVectorWrapper, DoubleSegmentedSortedMultiset, DoubleSubVector, DoubleVector.Indirect, DoubleVectorColumnWrapper, DoubleVectorDirect, DoubleVectorSlice, FloatRingBufferVectorWrapper, FloatSegmentedSortedMultiset, FloatSubVector, FloatVector.Indirect, FloatVectorColumnWrapper, FloatVectorDirect, FloatVectorSlice, InstantSsmSourceWrapper.ValueWrapper, IntRingBufferVectorWrapper, IntSegmentedSortedMultiset, IntSubVector, IntVector.Indirect, IntVectorColumnWrapper, IntVectorDirect, IntVectorSlice, LongRingBufferVectorWrapper, LongSegmentedSortedMultiset, LongSubVector, LongVector.Indirect, LongVectorColumnWrapper, LongVectorDirect, LongVectorSlice, ObjectRingBufferVectorWrapper, ObjectSegmentedSortedMultiset, ObjectSubVector, ObjectVector.Indirect, ObjectVectorColumnWrapper, ObjectVectorDirect, ObjectVectorSlice, ShortRingBufferVectorWrapper, ShortSegmentedSortedMultiset, ShortSubVector, ShortVector.Indirect, ShortVectorColumnWrapper, ShortVectorDirect, ShortVectorSlice

public interface Vector<VECTOR_TYPE extends Vector<VECTOR_TYPE>> extends Serializable, LongSizedDataStructure
Logical data structure representing an ordered list of elements.
  • Field Details

  • Method Details

    • subVector

      VECTOR_TYPE subVector(long fromIndexInclusive, long toIndexExclusive)
      Get a Vector that represents a slice of this Vector.
      fromIndexInclusive - The first offset into this Vector to include in the result; if negative, the result will have a range of null values at offsets in [0, -fromIndexInclusive)
      toIndexExclusive - The first offset into this Vector to not include in the result; if larger than size(), the result will have a range of null values at the corresponding offsets
      The sub-Vector specified by [fromIndexInclusive, toIndexExclusive)
    • subVectorByPositions

      VECTOR_TYPE subVectorByPositions(long[] positions)
      Get a Vector that represents a set of offset positions in this Vector.
      positions - The offsets to include; if not within [0, size()), the corresponding offset in the result will contain the appropriate null value
      The sub-Vector specified by positions
    • toArray

      Object toArray()
      Get an array representation of the elements of this Vector. Callers must not mutate the result, as implementations may choose to return their backing array in some cases.
      An array representation of the elements of this Vector that must not be mutated
    • copyToArray

      Object copyToArray()
      Get an array representation of the elements of this Vector. Callers may freely mutate the result, as it is guaranteed to be freshly-allocated and belongs to the caller upon return.
      An array representation of the elements of this Vector that may be freely mutated
    • getDirect

      VECTOR_TYPE getDirect()
      A version of this Vector that is flattened out to only reference memory
    • getComponentType

      Class<?> getComponentType()
      The type of elements contained by this Vector
    • toString

      String toString(int prefixLength)
      Get a String representation of a prefix of this Vector.
      prefixLength - The number of elements to include
      The specified prefix String representation
    • isEmpty

      default boolean isEmpty()
      Whether this Vector is empty
    • clampIndex

      static long clampIndex(long validFromInclusive, long validToExclusive, long index)
    • mapSelectedPositionRange

      static long[] mapSelectedPositionRange(@NotNull @org.jetbrains.annotations.NotNull long[] currentPositions, long selectedRangeStartInclusive, long selectedRangeEndExclusive)
    • mapSelectedPositions

      static long[] mapSelectedPositions(@NotNull @org.jetbrains.annotations.NotNull long[] currentPositions, @NotNull @org.jetbrains.annotations.NotNull long[] selectedPositions)
    • classToHelper

      static Function<Object,String> classToHelper(Class<?> clazz)