Package io.deephaven.vector
Interface Vector<VECTOR_TYPE extends Vector<VECTOR_TYPE>>
- All Superinterfaces:
Comparable<VECTOR_TYPE>,LongSizedDataStructure,Serializable
- All Known Subinterfaces:
ByteVector,CharVector,DoubleVector,FloatVector,IntVector,LongVector,ObjectVector<COMPONENT_TYPE>,RingBufferVectorWrapper<T>,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, Comparable<VECTOR_TYPE>
Logical data structure representing an ordered list of elements.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic longclampIndex(long validFromInclusive, long validToExclusive, long index) classToHelper(Class<?> clazz) Get an array representation of the elements of this Vector.Class<?>default booleanisEmpty()static long[]mapSelectedPositionRange(@org.jetbrains.annotations.NotNull long[] currentPositions, long selectedRangeStartInclusive, long selectedRangeEndExclusive) static long[]mapSelectedPositions(@org.jetbrains.annotations.NotNull long[] currentPositions, @org.jetbrains.annotations.NotNull long[] selectedPositions) subVector(long fromIndexInclusive, long toIndexExclusive) Get a Vector that represents a slice of this Vector.subVectorByPositions(long[] positions) Get a Vector that represents a set of offset positions in this Vector.toArray()Get an array representation of the elements of this Vector.toString(int prefixLength) Get a String representation of a prefix of this Vector.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface io.deephaven.util.datastructures.LongSizedDataStructure
intSize, intSize, size
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
NULL_ELEMENT_STRING
- See Also:
-
-
Method Details
-
subVector
@UserInvocationPermitted("vector") VECTOR_TYPE subVector(long fromIndexInclusive, long toIndexExclusive) Get a Vector that represents a slice of this Vector.- Parameters:
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 thansize(), the result will have a range of null values at the corresponding offsets- Returns:
- The sub-Vector specified by
[fromIndexInclusive, toIndexExclusive)
-
subVectorByPositions
Get a Vector that represents a set of offset positions in this Vector.- Parameters:
positions- The offsets to include; if not within[0, size()), the corresponding offset in the result will contain the appropriate null value- Returns:
- 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.- Returns:
- An array representation of the elements of this Vector that must not be mutated
-
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.- Returns:
- An array representation of the elements of this Vector that may be freely mutated
-
getDirect
- Returns:
- A version of this Vector that is flattened out to only reference memory
-
getComponentType
- Returns:
- The type of elements contained by this Vector
-
toString
Get a String representation of a prefix of this Vector.- Parameters:
prefixLength- The number of elements to include- Returns:
- The specified prefix String representation
-
isEmpty
- Returns:
- 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
-