Class IntegerValues
Defines a int values collection
Implements
Inherited Members
Namespace:
Assembly: .dll
Syntax
public final class IntegerValues implements IValues<Integer>
Constructors
IntegerValues()
Creates a new IntegerValues instance
Declaration
public IntegerValues()
IntegerValues(int capacity)
Creates a new IntegerValues instance
Declaration
public IntegerValues(int capacity)
Parameters
Type | Name | Description |
---|---|---|
int | capacity | The initial capacity |
IntegerValues(int[] items)
Creates a new IntegerValues instance and initializes it with specified array
Declaration
public IntegerValues(int[] items)
Parameters
Type | Name | Description |
---|---|---|
int[] | items | The array with items |
Methods
add(int value)
Adds new value
Declaration
public void add(int value)
Parameters
Type | Name | Description |
---|---|---|
int | value | The value to add |
add(int location, int value)
Adds new value at specified location
Declaration
public void add(int location, int value)
Parameters
Type | Name | Description |
---|---|---|
int | location | The location to add value at |
int | value | The value to add |
add(int[] values)
Adds multiple values from array
Declaration
public void add(int[] values)
Parameters
Type | Name | Description |
---|---|---|
int[] | values | The values to add |
add(int[] values, int startIndex, int count)
Adds multiple values from array region
Declaration
public void add(int[] values, int startIndex, int count)
Parameters
Type | Name | Description |
---|---|---|
int[] | values | The values array to add |
int | startIndex | The index of first value to add |
int | count | The amount of values to add |
clear()
Clears values without disposing allocated memory
Declaration
public void clear()
disposeItems()
Clears and disposes allocated memory
Declaration
public void disposeItems()
get(int index)
Gets the value at specified location
Declaration
public int get(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of value to get |
Returns
Type | Description |
---|---|
int | The value |
getItemsArray()
Gets the internal items array
Declaration
public int[] getItemsArray()
Returns
Type | Description |
---|---|
int[] | The items array |
getValuesType()
Get type of values
Declaration
public Class<Integer> getValuesType()
Returns
Type | Description |
---|---|
Class<Integer> |
remove(int location)
Removes value at specified location
Declaration
public void remove(int location)
Parameters
Type | Name | Description |
---|---|---|
int | location | The location to remove value tat |
set(int location, int value)
Sets the value at specified location
Declaration
public void set(int location, int value)
Parameters
Type | Name | Description |
---|---|---|
int | location | The location to set value at |
int | value | The value to set |
setSize(int size)
Sets the values size
Declaration
public void setSize(int size)
Parameters
Type | Name | Description |
---|---|---|
int | size | The new size of values instance |
size()
Gets the size of values
Declaration
public int size()
Returns
Type | Description |
---|---|
int |