N
- Number typepublic class NumberVectorAdapter<N extends Number> extends Object implements NumberArrayAdapter<N,NumberVector<N>>
ArrayLikeUtil
!Modifier | Constructor and Description |
---|---|
protected |
NumberVectorAdapter()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
N |
get(NumberVector<N> array,
int off)
Deprecated.
|
byte |
getByte(NumberVector<N> array,
int off)
Get the off'th item from the array as byte.
|
double |
getDouble(NumberVector<N> array,
int off)
Get the off'th item from the array as double.
|
float |
getFloat(NumberVector<N> array,
int off)
Get the off'th item from the array as float.
|
int |
getInteger(NumberVector<N> array,
int off)
Get the off'th item from the array as integer.
|
long |
getLong(NumberVector<N> array,
int off)
Get the off'th item from the array as long.
|
short |
getShort(NumberVector<N> array,
int off)
Get the off'th item from the array as short.
|
int |
size(NumberVector<N> array)
Get the size of the array.
|
protected NumberVectorAdapter()
ArrayLikeUtil
!public int size(NumberVector<N> array)
ArrayAdapter
size
in interface ArrayAdapter<N extends Number,NumberVector<N extends Number>>
size
in interface NumberArrayAdapter<N extends Number,NumberVector<N extends Number>>
array
- Array-like thing@Deprecated public N get(NumberVector<N> array, int off) throws IndexOutOfBoundsException
ArrayAdapter
get
in interface ArrayAdapter<N extends Number,NumberVector<N extends Number>>
get
in interface NumberArrayAdapter<N extends Number,NumberVector<N extends Number>>
array
- Array to get fromoff
- OffsetIndexOutOfBoundsException
- for an invalid index.public double getDouble(NumberVector<N> array, int off) throws IndexOutOfBoundsException
NumberArrayAdapter
getDouble
in interface NumberArrayAdapter<N extends Number,NumberVector<N extends Number>>
array
- Array to get fromoff
- OffsetIndexOutOfBoundsException
- for an invalid index.public float getFloat(NumberVector<N> array, int off) throws IndexOutOfBoundsException
NumberArrayAdapter
getFloat
in interface NumberArrayAdapter<N extends Number,NumberVector<N extends Number>>
array
- Array to get fromoff
- OffsetIndexOutOfBoundsException
- for an invalid index.public int getInteger(NumberVector<N> array, int off) throws IndexOutOfBoundsException
NumberArrayAdapter
getInteger
in interface NumberArrayAdapter<N extends Number,NumberVector<N extends Number>>
array
- Array to get fromoff
- OffsetIndexOutOfBoundsException
- for an invalid index.public short getShort(NumberVector<N> array, int off) throws IndexOutOfBoundsException
NumberArrayAdapter
getShort
in interface NumberArrayAdapter<N extends Number,NumberVector<N extends Number>>
array
- Array to get fromoff
- OffsetIndexOutOfBoundsException
- for an invalid index.public long getLong(NumberVector<N> array, int off) throws IndexOutOfBoundsException
NumberArrayAdapter
getLong
in interface NumberArrayAdapter<N extends Number,NumberVector<N extends Number>>
array
- Array to get fromoff
- OffsetIndexOutOfBoundsException
- for an invalid index.public byte getByte(NumberVector<N> array, int off) throws IndexOutOfBoundsException
NumberArrayAdapter
getByte
in interface NumberArrayAdapter<N extends Number,NumberVector<N extends Number>>
array
- Array to get fromoff
- OffsetIndexOutOfBoundsException
- for an invalid index.