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