cage
Class CaGeResultList
java.lang.Object
cage.CaGeResultList
public class CaGeResultList
- extends java.lang.Object
A result "collection" of CaGe's production process, with
some methods to traverse it.
A CaGeResultList maintains a "cursor" that points at the
"current" element in the list (as long as it is not empty).
The cursor is moved by the next()
and
previous()
methods.
addGraph
will set the cursor to the graph
that is added (i.e. to the end of the list).
The class implements several methods that look like those
of the ListIterator interface in terms of name and signature.
But we do not keep to the (semantic) contract of that
interface because of the different way backward/forward
movement is handled. Alternating calls to next() and
previous() will not return the same element repeatedly,
as stipulated in the contract. Instead, if both calls succeed,
the same two elements will be returned in alternation.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CaGeResultList
public CaGeResultList()
addGraph
public void addGraph(EmbeddableGraph graph,
int graphNo)
addResult
public void addResult(CaGeResult result)
getGraph
public EmbeddableGraph getGraph()
getGraphNo
public int getGraphNo()
getResult
public CaGeResult getResult()
findGraphNo
public boolean findGraphNo(int no)
gotoFound
public void gotoFound()
nextIndex
public int nextIndex()
hasNext
public boolean hasNext()
next
public java.lang.Object next()
throws java.util.NoSuchElementException
- Throws:
java.util.NoSuchElementException
nextGraphNo
public int nextGraphNo()
previousIndex
public int previousIndex()
hasPrevious
public boolean hasPrevious()
previous
public java.lang.Object previous()
throws java.util.NoSuchElementException
- Throws:
java.util.NoSuchElementException
previousGraphNo
public int previousGraphNo()
highestGraphNo
public int highestGraphNo()
gotoHighest
public void gotoHighest()