T
- Entry typeA
- Array typepublic class SubsetNumberArrayAdapter<T extends java.lang.Number,A> extends java.lang.Object implements NumberArrayAdapter<T,A>
Modifier and Type | Field and Description |
---|---|
(package private) int[] |
offs
Offsets to return
|
(package private) NumberArrayAdapter<T,? super A> |
wrapped
Wrapped adapter
|
Constructor and Description |
---|
SubsetNumberArrayAdapter(NumberArrayAdapter<T,? super A> wrapped,
int[] offs)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
T |
get(A array,
int off)
Get the off'th item from the array.
|
byte |
getByte(A array,
int off)
Get the off'th item from the array as byte.
|
double |
getDouble(A array,
int off)
Get the off'th item from the array as double.
|
float |
getFloat(A array,
int off)
Get the off'th item from the array as float.
|
int |
getInteger(A array,
int off)
Get the off'th item from the array as integer.
|
long |
getLong(A array,
int off)
Get the off'th item from the array as long.
|
short |
getShort(A array,
int off)
Get the off'th item from the array as short.
|
int |
size(A array)
Get the size of the array.
|
NumberArrayAdapter<T extends java.lang.Number,? super A> wrapped
int[] offs
public SubsetNumberArrayAdapter(NumberArrayAdapter<T,? super A> wrapped, int[] offs)
wrapped
- Wrapped adapteroffs
- Offsetspublic int size(A array)
ArrayAdapter
size
in interface ArrayAdapter<T extends java.lang.Number,A>
size
in interface NumberArrayAdapter<T extends java.lang.Number,A>
array
- Array-like thingpublic T get(A array, int off) throws java.lang.IndexOutOfBoundsException
ArrayAdapter
get
in interface ArrayAdapter<T extends java.lang.Number,A>
get
in interface NumberArrayAdapter<T extends java.lang.Number,A>
array
- Array to get fromoff
- Offsetjava.lang.IndexOutOfBoundsException
- for an invalid index.public double getDouble(A array, int off) throws java.lang.IndexOutOfBoundsException
NumberArrayAdapter
getDouble
in interface NumberArrayAdapter<T extends java.lang.Number,A>
array
- Array to get fromoff
- Offsetjava.lang.IndexOutOfBoundsException
- for an invalid index.public float getFloat(A array, int off) throws java.lang.IndexOutOfBoundsException
NumberArrayAdapter
getFloat
in interface NumberArrayAdapter<T extends java.lang.Number,A>
array
- Array to get fromoff
- Offsetjava.lang.IndexOutOfBoundsException
- for an invalid index.public int getInteger(A array, int off) throws java.lang.IndexOutOfBoundsException
NumberArrayAdapter
getInteger
in interface NumberArrayAdapter<T extends java.lang.Number,A>
array
- Array to get fromoff
- Offsetjava.lang.IndexOutOfBoundsException
- for an invalid index.public short getShort(A array, int off) throws java.lang.IndexOutOfBoundsException
NumberArrayAdapter
getShort
in interface NumberArrayAdapter<T extends java.lang.Number,A>
array
- Array to get fromoff
- Offsetjava.lang.IndexOutOfBoundsException
- for an invalid index.public long getLong(A array, int off) throws java.lang.IndexOutOfBoundsException
NumberArrayAdapter
getLong
in interface NumberArrayAdapter<T extends java.lang.Number,A>
array
- Array to get fromoff
- Offsetjava.lang.IndexOutOfBoundsException
- for an invalid index.public byte getByte(A array, int off) throws java.lang.IndexOutOfBoundsException
NumberArrayAdapter
getByte
in interface NumberArrayAdapter<T extends java.lang.Number,A>
array
- Array to get fromoff
- Offsetjava.lang.IndexOutOfBoundsException
- for an invalid index.Copyright © 2019 ELKI Development Team. License information.