|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.common.util.objects.DeterministicIndicedList<O>
public class DeterministicIndicedList<O extends IIndex>
Constructor Summary | |
---|---|
DeterministicIndicedList(Class clazz)
Constructor |
|
DeterministicIndicedList(Class clazz,
int initialSize)
Constructor |
Method Summary | |
---|---|
void |
add(O object)
Add object to the structure |
void |
clear()
|
boolean |
contains(O object)
Indicates wether the structure contains the object |
O |
get(int i)
Get the object in position i |
int |
get(O object)
Get the position of the object |
O |
getLast()
|
DisposableIterator<O> |
iterator()
Iterator over objects |
int |
remove(O object)
Remove object from the structure We just swap the last object and the removed object |
int |
size()
Get the number of objects contained |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DeterministicIndicedList(Class clazz, int initialSize)
clazz
- the super Class of include objectinitialSize
- initial size of the structurepublic DeterministicIndicedList(Class clazz)
clazz
- the super Class of include objectMethod Detail |
---|
public void clear()
public void add(O object)
object
- public int remove(O object)
object
- to removepublic boolean contains(O object)
object
-
public int size()
public O get(int i)
i
- position of the object
public int get(O object)
object
- required
public O getLast()
public DisposableIterator<O> iterator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |