|
TUM CCSM Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.tum.cs.commons.collections.ManagedIntArray
edu.tum.cs.commons.collections.IntList
public class IntList
A really simple list for storing ints. This exists as it is both more efficient and uses way less memory than a List of Integers.
Field Summary |
---|
Fields inherited from class edu.tum.cs.commons.collections.ManagedIntArray |
---|
array, size |
Constructor Summary | |
---|---|
IntList()
|
Method Summary | |
---|---|
void |
add(int value)
Adds an element to the end of the list. |
int |
get(int index)
Returns the element at the given index. |
int |
getSize()
Returns the size of the list. |
void |
set(int index,
int value)
Set the element at the given index. |
Methods inherited from class edu.tum.cs.commons.collections.ManagedIntArray |
---|
addArrayElement, addArrayElements |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntList()
Method Detail |
---|
public int getSize()
public int get(int index)
ArrayIndexOutOfBoundsException
,
and sometimes just 0 returned, depending on if you reached existing
memory by chance.
public void set(int index, int value)
ArrayIndexOutOfBoundsException
, and
sometimes not for illegal indexes, depending on whether you hit memory
allocated by the exponential growth strategy by chance.
public void add(int value)
|
TUM CCSM Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |