T - the type of vector elements.TS - the type of stream elements.S - the type of stream.public interface BaseVector<T,TS,S extends java.util.stream.BaseStream<TS,S>>
extends java.io.Serializable
| Modifier and Type | Method and Description |
|---|---|
default BaseVector<T,TS,S> |
apply(int... index)
Returns a new vector with selected entries.
|
default T |
apply(int i)
Returns the value at position i, which may be null.
|
java.lang.Object |
array()
Returns the array that backs this vector.
|
default StructField |
field()
Returns a struct field corresponding to this vector.
|
BaseVector<T,TS,S> |
get(int... index)
Returns a new vector with selected entries.
|
T |
get(int i)
Returns the value at position i, which may be null.
|
byte |
getByte(int i)
Returns the byte value at position i.
|
double |
getDouble(int i)
Returns the double value at position i.
|
float |
getFloat(int i)
Returns the float value at position i.
|
int |
getInt(int i)
Returns the integer value at position i.
|
long |
getLong(int i)
Returns the long value at position i.
|
short |
getShort(int i)
Returns the short value at position i.
|
default Measure |
measure()
Returns the (optional) level of measurements.
|
java.lang.String |
name()
Return the (optional) name associated with vector.
|
int |
size()
Number of elements in the vector.
|
S |
stream()
Returns a (possibly parallel) Stream with this vector as its source.
|
default double[] |
toDoubleArray()
Returns a double array of this vector.
|
default double[] |
toDoubleArray(double[] a)
Copies the vector value as double to the given array.
|
default int[] |
toIntArray()
Returns an integer array of this vector.
|
default int[] |
toIntArray(int[] a)
Copies the vector value as int to the given array.
|
default java.lang.String[] |
toStringArray()
Returns a string array of this vector.
|
default java.lang.String[] |
toStringArray(java.lang.String[] a)
Copies the vector value as string to the given array.
|
DataType |
type()
Returns the element type.
|
java.lang.String name()
DataType type()
default Measure measure()
default StructField field()
int size()
java.lang.Object array()
default double[] toDoubleArray()
default double[] toDoubleArray(double[] a)
a.default int[] toIntArray()
default int[] toIntArray(int[] a)
a.default java.lang.String[] toStringArray()
default java.lang.String[] toStringArray(java.lang.String[] a)
a.T get(int i)
BaseVector<T,TS,S> get(int... index)
index - the index of selected entries.byte getByte(int i)
short getShort(int i)
int getInt(int i)
long getLong(int i)
float getFloat(int i)
double getDouble(int i)
default T apply(int i)
default BaseVector<T,TS,S> apply(int... index)
index - the index of selected entries.S stream()