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