T
- Data object type.public class NumberListArrayAdapter<T extends Number> extends Object implements NumberArrayAdapter<T,List<? extends T>>
List
in an array of number
API.
Use the static instance from ArrayLikeUtil
!Modifier | Constructor and Description |
---|---|
protected |
NumberListArrayAdapter()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
T |
get(List<? extends T> array,
int off)
Get the off'th item from the array.
|
byte |
getByte(List<? extends T> array,
int off)
Get the off'th item from the array as byte.
|
double |
getDouble(List<? extends T> array,
int off)
Get the off'th item from the array as double.
|
float |
getFloat(List<? extends T> array,
int off)
Get the off'th item from the array as float.
|
int |
getInteger(List<? extends T> array,
int off)
Get the off'th item from the array as integer.
|
long |
getLong(List<? extends T> array,
int off)
Get the off'th item from the array as long.
|
short |
getShort(List<? extends T> array,
int off)
Get the off'th item from the array as short.
|
int |
size(List<? extends T> array)
Get the size of the array.
|
protected NumberListArrayAdapter()
ArrayLikeUtil
!public int size(List<? extends T> array)
ArrayAdapter
public T get(List<? extends T> array, int off) throws IndexOutOfBoundsException
ArrayAdapter
get
in interface ArrayAdapter<T extends Number,List<? extends T extends Number>>
get
in interface NumberArrayAdapter<T extends Number,List<? extends T extends Number>>
array
- Array to get fromoff
- OffsetIndexOutOfBoundsException
- for an invalid index.public double getDouble(List<? extends T> array, int off) throws IndexOutOfBoundsException
NumberArrayAdapter
getDouble
in interface NumberArrayAdapter<T extends Number,List<? extends T extends Number>>
array
- Array to get fromoff
- OffsetIndexOutOfBoundsException
- for an invalid index.public float getFloat(List<? extends T> array, int off) throws IndexOutOfBoundsException
NumberArrayAdapter
getFloat
in interface NumberArrayAdapter<T extends Number,List<? extends T extends Number>>
array
- Array to get fromoff
- OffsetIndexOutOfBoundsException
- for an invalid index.public int getInteger(List<? extends T> array, int off) throws IndexOutOfBoundsException
NumberArrayAdapter
getInteger
in interface NumberArrayAdapter<T extends Number,List<? extends T extends Number>>
array
- Array to get fromoff
- OffsetIndexOutOfBoundsException
- for an invalid index.public short getShort(List<? extends T> array, int off) throws IndexOutOfBoundsException
NumberArrayAdapter
getShort
in interface NumberArrayAdapter<T extends Number,List<? extends T extends Number>>
array
- Array to get fromoff
- OffsetIndexOutOfBoundsException
- for an invalid index.public long getLong(List<? extends T> array, int off) throws IndexOutOfBoundsException
NumberArrayAdapter
getLong
in interface NumberArrayAdapter<T extends Number,List<? extends T extends Number>>
array
- Array to get fromoff
- OffsetIndexOutOfBoundsException
- for an invalid index.public byte getByte(List<? extends T> array, int off) throws IndexOutOfBoundsException
NumberArrayAdapter
getByte
in interface NumberArrayAdapter<T extends Number,List<? extends T extends Number>>
array
- Array to get fromoff
- OffsetIndexOutOfBoundsException
- for an invalid index.