- Type Parameters:
N- Number typeA- Array type
- All Superinterfaces:
ArrayAdapter<N,A>
Adapter for arrays of numbers, to avoid boxing.
- Author:
- Erich Schubert
-
Method Summary
Modifier and TypeMethodDescriptionGet the off'th item from the array.byteGet the off'th item from the array as byte.doubleGet the off'th item from the array as double.floatGet the off'th item from the array as float.intgetInteger(A array, int off) Get the off'th item from the array as integer.longGet the off'th item from the array as long.shortGet the off'th item from the array as short.intGet the size of the array.
-
Method Details
-
size
Description copied from interface:ArrayAdapterGet the size of the array.- Specified by:
sizein interfaceArrayAdapter<N extends Number,A> - Parameters:
array- Array-like thing- Returns:
- Size
-
get
Description copied from interface:ArrayAdapterGet the off'th item from the array.- Specified by:
getin interfaceArrayAdapter<N extends Number,A> - Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
IndexOutOfBoundsException- for an invalid index.
-
getDouble
Get the off'th item from the array as double.- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
IndexOutOfBoundsException- for an invalid index.
-
getFloat
Get the off'th item from the array as float.- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
IndexOutOfBoundsException- for an invalid index.
-
getInteger
Get the off'th item from the array as integer.- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
IndexOutOfBoundsException- for an invalid index.
-
getShort
Get the off'th item from the array as short.- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
IndexOutOfBoundsException- for an invalid index.
-
getLong
Get the off'th item from the array as long.- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
IndexOutOfBoundsException- for an invalid index.
-
getByte
Get the off'th item from the array as byte.- Parameters:
array- Array to get fromoff- Offset- Returns:
- Item at offset off
- Throws:
IndexOutOfBoundsException- for an invalid index.
-