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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(int i) add a new elementvoidappend an int array list at the endvoidclear()clear listintget(int i) get element at index ibooleanremove(int i) remove an element from listvoidset(int i, int value) replace element at index i by valueintsize()get the size of the listlongget 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
-