au.id.pbw.hyfo.hyph
Class BigTernaryTree.TernaryIterator

java.lang.Object
  extended by au.id.pbw.hyfo.hyph.BigTernaryTree.TernaryIterator
All Implemented Interfaces:
Iterator<TreeElement>
Enclosing class:
BigTernaryTree

public class BigTernaryTree.TernaryIterator
extends Object
implements Iterator<TreeElement>

Defines an in-order Iterator over the tree. The iterator uses a server thread which walks the tree, feeding TreeElements back through a blocking queue, which the iterator reads to obtain status anc content from the tree wlaker.


Field Summary
static boolean FAIR
          User fair queueing.
static int Q_CAPACITY
          The initial capacity of the
 
Constructor Summary
BigTernaryTree.TernaryIterator()
          Constructs a new in-order iterator.
 
Method Summary
 boolean hasNext()
          Does the iterator have anotehr element?
 TreeElement next()
          Gets the next element from the itertor, or null if the iterator is exhausted.
 void remove()
          This operation is unsupported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Q_CAPACITY

public static final int Q_CAPACITY
The initial capacity of the

See Also:
Constant Field Values

FAIR

public static final boolean FAIR
User fair queueing.

See Also:
Constant Field Values
Constructor Detail

BigTernaryTree.TernaryIterator

public BigTernaryTree.TernaryIterator()
Constructs a new in-order iterator.

Method Detail

next

public TreeElement next()
Gets the next element from the itertor, or null if the iterator is exhausted.

Specified by:
next in interface Iterator<TreeElement>
Returns:
the next element from the iterator, or null.

hasNext

public boolean hasNext()
Does the iterator have anotehr element?

Specified by:
hasNext in interface Iterator<TreeElement>
Returns:
true if the iterator has another element.

remove

public void remove()
This operation is unsupported.

Specified by:
remove in interface Iterator<TreeElement>


Copyright © 2005-2006 Peter B. West.