Constructor | Description |
---|---|
AtomArrayList() |
|
AtomArrayList(int initialSize) |
|
AtomArrayList(IAtomList list) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
add(IAtom atom) |
|
void |
addAll(IAtomList atoms) |
|
void |
clear() |
|
boolean |
contains(IAtom elem) |
Returns true if the given atom is in the list, false otherwise
|
void |
ensureCapacity(int minCapacity) |
|
IAtom |
get(int index) |
Returns the i-th atom, with numbering beginning from 0.
|
static float |
getSizeIncreaseRatio() |
|
float |
getTrimThreshold() |
|
int |
indexOf(IAtom elem) |
|
boolean |
isEmpty() |
|
void |
maybeTrimToSize() |
|
IAtom |
remove(int index) |
This removes the atom at the given index and shifts the remaining atoms
back (maintaining the order).
|
IAtom |
removeAndReplace(int index) |
This removes the atom at the given index and replaces the hole with the
last atom.
|
IAtom |
set(int index,
IAtom element) |
|
void |
setTrimThreshold(float newTrimThreshold) |
|
int |
size() |
|
int |
sizeOfArray() |
|
IAtom[] |
toArray() |
|
IAtom[] |
toAtomLeafArray() |
|
java.lang.String |
toString() |
|
void |
trimToSize() |
addAll, contains, containsAll, remove, removeAll, retainAll, toArray
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
public AtomArrayList()
public AtomArrayList(int initialSize)
public AtomArrayList(IAtomList list)
public static float getSizeIncreaseRatio()
public void trimToSize()
public void maybeTrimToSize()
public float getTrimThreshold()
public void setTrimThreshold(float newTrimThreshold)
public void ensureCapacity(int minCapacity)
public boolean isEmpty()
public IAtom[] toArray()
public void clear()
public int sizeOfArray()
public int indexOf(IAtom elem)
public boolean contains(IAtom elem)
public IAtom[] toAtomLeafArray()
public boolean add(IAtom atom)
public void addAll(IAtomList atoms)
public IAtom remove(int index)
public IAtom removeAndReplace(int index)
public int size()
public IAtom get(int index)
IAtomList
get
in interface IAtomList
get
in interface java.util.List<IAtom>
get
in class java.util.AbstractList<IAtom>
index
- the index of the desired atom in the list
if i is greater than count-1, throws an IllegalArgumentException.public java.lang.String toString()
toString
in class java.util.AbstractCollection<IAtom>