AtomLeafsetIterator
, AtomsetIterator
, java.io.Serializable
ApiLeafAtoms
public class ApiIntraArrayList extends java.lang.Object implements AtomLeafsetIterator, java.io.Serializable
Constructor | Description |
---|---|
ApiIntraArrayList() |
Construct iterator with an empty list.
|
ApiIntraArrayList(IAtomList list) |
Constructs iterator to return pairs from the given list.
|
Modifier and Type | Method | Description |
---|---|---|
IAtomList |
getList() |
Returns the list used to generate the pairs.
|
int |
nBody() |
Returns 2, indicating that this is a pair iterator
|
IAtomList |
next() |
Returns the next iterate pair.
|
void |
reset() |
Sets iterator in condition to begin iteration.
|
void |
setList(IAtomList newList) |
Sets the list that will be used to generate the pairs.
|
int |
size() |
Returns the number of iterates, which is list.size*(list.size-1)/2
|
void |
unset() |
Sets iterator such that next is null.
|
public ApiIntraArrayList()
public ApiIntraArrayList(IAtomList list)
list
- public void reset()
reset
in interface AtomsetIterator
public void unset()
unset
in interface AtomsetIterator
public int size()
size
in interface AtomsetIterator
public IAtomList next()
next
in interface AtomLeafsetIterator
public int nBody()
nBody
in interface AtomsetIterator
public void setList(IAtomList newList)
newList
- the new atom list for iterationpublic IAtomList getList()