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