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