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