xxl.visual
Class VisualPeekIterator

java.lang.Object
  |
  +--xxl.visual.VisualIterator
        |
        +--xxl.visual.VisualPeekIterator
Direct Known Subclasses:
VisualCursor

public class VisualPeekIterator
extends VisualIterator

This class extends xxl.visual.VisualIterator with the peek()-functionality.


Inner classes inherited from class xxl.visual.VisualIterator
VisualIterator.IteratorFunction
 
Fields inherited from class xxl.visual.VisualIterator
children, inputOf, iterator, newIterator, parameters
 
Constructor Summary
VisualPeekIterator(VisualIterator.IteratorFunction newPeekIterator)
           
 
Method Summary
 java.lang.Object peek()
          Shows the next element in the iteration without removing it.
 boolean supportsPeek()
          Returns true if the peek operation is supported by this PeekIterator.
 
Methods inherited from class xxl.visual.VisualIterator
addInput, getParameters, hasNext, next, open, remove, removeInput, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VisualPeekIterator

public VisualPeekIterator(VisualIterator.IteratorFunction newPeekIterator)
Method Detail

peek

public java.lang.Object peek()
                      throws java.util.NoSuchElementException,
                             java.lang.UnsupportedOperationException
Shows the next element in the iteration without removing it.
Returns:
the next element in the iteration
Throws:
java.util.NoSuchElementException - iteration has no more elements.
java.lang.UnsupportedOperationException - if the peek operation is not supported by this PeekIterator.

supportsPeek

public boolean supportsPeek()
Returns true if the peek operation is supported by this PeekIterator.
Returns:
true if the peek operation is supported by this PeekIterator