Package com.semedy.reasoner.utils
Class IntArrayList
java.lang.Object
com.semedy.reasoner.utils.IntArrayList
List for ints based on arrays
- Author:
- juergen
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(int i) add a new elementvoid
append an int array list at the endvoid
clear()
clear listint
get
(int i) get element at index iboolean
remove
(int i) remove an element from listvoid
set
(int i, int value) replace element at index i by valueint
size()
get the size of the listlong
get the size of the list in bytes
-
Constructor Details
-
IntArrayList
public IntArrayList()
-
-
Method Details
-
sizeInBytes
public long sizeInBytes()get the size of the list in bytes- Returns:
-
add
add a new element- Parameters:
i
- , the element to add- Returns:
- has element been added
- Throws:
IOException
-
remove
public boolean remove(int i) remove an element from list- Parameters:
i
- , element to be removed- Returns:
- element has been removed
-
get
public int get(int i) get element at index i- Parameters:
i
-- Returns:
-
set
public void set(int i, int value) replace element at index i by value- Parameters:
i
- , indexvalue
- , new value
-
size
public int size()get the size of the list- Returns:
-
clear
public void clear()clear list -
append
append an int array list at the end- Parameters:
L
- , list to append- Throws:
IOException
-