SiteIterator
, java.io.Serializable
public static class RectangularLattice.Iterator extends java.lang.Object implements SiteIterator, java.io.Serializable
Constructor | Description |
---|---|
Iterator(int D) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
hasNext() |
Indicates whether the iterator has another site to return.
|
java.lang.Object |
next() |
Returns the next iterate.
|
int[] |
nextIndex() |
Returns the index of the next iterate while advancing iterator.
|
java.lang.Object |
peek() |
Returns the next iterate without advancing the iterator.
|
void |
reset() |
Puts the iterator in a state ready to begin iteration.
|
void |
setLattice(FiniteLattice lattice) |
Sets the lattice having the sites to be given by this iterator.
|
int |
size() |
Returns the number of iterates that this iterator would give
if reset.
|
void |
unset() |
Puts the iterator in a state such that hasNext is false.
|
public boolean hasNext()
SiteIterator
hasNext
in interface SiteIterator
public java.lang.Object next()
SiteIterator
next
in interface SiteIterator
public int[] nextIndex()
SiteIterator
nextIndex
in interface SiteIterator
public java.lang.Object peek()
SiteIterator
peek
in interface SiteIterator
public void reset()
SiteIterator
reset
in interface SiteIterator
public int size()
SiteIterator
size
in interface SiteIterator
public void unset()
SiteIterator
unset
in interface SiteIterator
public void setLattice(FiniteLattice lattice)
SiteIterator
setLattice
in interface SiteIterator