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