Class FloatArrayAdapter
- java.lang.Object
-
- elki.utilities.datastructures.arraylike.FloatArrayAdapter
-
- All Implemented Interfaces:
ArrayAdapter<java.lang.Float,float[]>
,NumberArrayAdapter<java.lang.Float,float[]>
public class FloatArrayAdapter extends java.lang.Object implements NumberArrayAdapter<java.lang.Float,float[]>
Use afloat[]
in the ArrayAdapter API.This class is generated from a code template.
- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description static FloatArrayAdapter
STATIC
Static instance.
-
Constructor Summary
Constructors Modifier Constructor Description protected
FloatArrayAdapter()
Private constructor - use the static instance inSTATIC
!
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Float
get(float[] array, int off)
Deprecated.byte
getByte(float[] array, int off)
Get the off'th item from the array as byte.double
getDouble(float[] array, int off)
Get the off'th item from the array as double.float
getFloat(float[] array, int off)
Get the off'th item from the array as float.int
getInteger(float[] array, int off)
Get the off'th item from the array as integer.long
getLong(float[] array, int off)
Get the off'th item from the array as long.short
getShort(float[] array, int off)
Get the off'th item from the array as short.int
size(float[] array)
Get the size of the array.
-
-
-
Field Detail
-
STATIC
public static final FloatArrayAdapter STATIC
Static instance.
-
-
Constructor Detail
-
FloatArrayAdapter
protected FloatArrayAdapter()
Private constructor - use the static instance inSTATIC
!
-
-
Method Detail
-
size
public int size(float[] array)
Description copied from interface:ArrayAdapter
Get the size of the array.- Specified by:
size
in interfaceArrayAdapter<java.lang.Float,float[]>
- Specified by:
size
in interfaceNumberArrayAdapter<java.lang.Float,float[]>
- Parameters:
array
- Array-like thing- Returns:
- Size
-
get
@Deprecated public java.lang.Float get(float[] array, int off) throws java.lang.IndexOutOfBoundsException
Deprecated.Description copied from interface:ArrayAdapter
Get the off'th item from the array.- Specified by:
get
in interfaceArrayAdapter<java.lang.Float,float[]>
- Specified by:
get
in interfaceNumberArrayAdapter<java.lang.Float,float[]>
- Parameters:
array
- Array to get fromoff
- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException
- for an invalid index.
-
getDouble
public double getDouble(float[] array, int off) throws java.lang.IndexOutOfBoundsException
Description copied from interface:NumberArrayAdapter
Get the off'th item from the array as double.- Specified by:
getDouble
in interfaceNumberArrayAdapter<java.lang.Float,float[]>
- Parameters:
array
- Array to get fromoff
- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException
- for an invalid index.
-
getFloat
public float getFloat(float[] array, int off) throws java.lang.IndexOutOfBoundsException
Description copied from interface:NumberArrayAdapter
Get the off'th item from the array as float.- Specified by:
getFloat
in interfaceNumberArrayAdapter<java.lang.Float,float[]>
- Parameters:
array
- Array to get fromoff
- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException
- for an invalid index.
-
getInteger
public int getInteger(float[] array, int off) throws java.lang.IndexOutOfBoundsException
Description copied from interface:NumberArrayAdapter
Get the off'th item from the array as integer.- Specified by:
getInteger
in interfaceNumberArrayAdapter<java.lang.Float,float[]>
- Parameters:
array
- Array to get fromoff
- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException
- for an invalid index.
-
getShort
public short getShort(float[] array, int off) throws java.lang.IndexOutOfBoundsException
Description copied from interface:NumberArrayAdapter
Get the off'th item from the array as short.- Specified by:
getShort
in interfaceNumberArrayAdapter<java.lang.Float,float[]>
- Parameters:
array
- Array to get fromoff
- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException
- for an invalid index.
-
getLong
public long getLong(float[] array, int off) throws java.lang.IndexOutOfBoundsException
Description copied from interface:NumberArrayAdapter
Get the off'th item from the array as long.- Specified by:
getLong
in interfaceNumberArrayAdapter<java.lang.Float,float[]>
- Parameters:
array
- Array to get fromoff
- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException
- for an invalid index.
-
getByte
public byte getByte(float[] array, int off) throws java.lang.IndexOutOfBoundsException
Description copied from interface:NumberArrayAdapter
Get the off'th item from the array as byte.- Specified by:
getByte
in interfaceNumberArrayAdapter<java.lang.Float,float[]>
- Parameters:
array
- Array to get fromoff
- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException
- for an invalid index.
-
-