- 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.byte
Get the off'th item from the array as byte.double
Get the off'th item from the array as double.float
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
Get the off'th item from the array as long.short
Get the off'th item from the array as short.int
Get the size of the array.
-
Method Details
-
size
Description copied from interface:ArrayAdapter
Get the size of the array.- Specified by:
size
in interfaceArrayAdapter<N extends Number,
A> - Parameters:
array
- Array-like thing- Returns:
- Size
-
get
Description copied from interface:ArrayAdapter
Get the off'th item from the array.- Specified by:
get
in 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.
-