public final class FloatValues extends java.lang.Object implements IValues<java.lang.Float>
Constructor and Description |
---|
FloatValues()
Creates a new
FloatValues instance |
FloatValues(float[] items)
Creates a new
FloatValues instance and initializes it with specified array |
FloatValues(int capacity)
Creates a new
FloatValues instance |
Modifier and Type | Method and Description |
---|---|
void |
add(float value)
Adds new value
|
void |
add(float[] values)
Adds multiple values from array
|
void |
add(float[] values,
int startIndex,
int count)
Adds multiple values from array region
|
void |
add(int location,
float value)
Adds new value at specified location
|
void |
clear()
Clears values without disposing allocated memory
|
void |
disposeItems()
Clears and disposes allocated memory
|
float |
get(int index)
Gets the value at specified location
|
float[] |
getItemsArray()
Gets the internal items array
|
java.lang.Class<java.lang.Float> |
getValuesType()
Get type of values
|
void |
remove(int location)
Removes value at specified location
|
void |
set(int location,
float value)
Sets the value at specified location
|
void |
setSize(int size)
Sets the values size
|
int |
size()
Gets the size of values
|
public FloatValues()
FloatValues
instancepublic FloatValues(int capacity)
FloatValues
instancecapacity
- The initial capacitypublic FloatValues(float[] items)
FloatValues
instance and initializes it with specified arrayitems
- The array with itemspublic float[] getItemsArray()
public void add(float value)
value
- The value to addpublic void add(int location, float value)
location
- The location to add value atvalue
- The value to addpublic void add(float[] values)
values
- The values to addpublic void add(float[] values, int startIndex, int count)
values
- The values array to addstartIndex
- The index of first value to addcount
- The amount of values to addpublic void set(int location, float value)
location
- The location to set value atvalue
- The value to setpublic float get(int index)
index
- The index of value to getpublic int size()
public void setSize(int size)
size
- The new size of values instancepublic void remove(int location)
location
- The location to remove value tatpublic void clear()
clear
in interface ICleanable
public void disposeItems()
public java.lang.Class<java.lang.Float> getValuesType()
getValuesType
in interface IValues<java.lang.Float>