xxl.visual
Class VisualIterator
java.lang.Object
|
+--xxl.visual.VisualIterator
- Direct Known Subclasses:
- VisualFileInputIterator, VisualPeekIterator
- public class VisualIterator
- extends java.lang.Object
- implements java.util.Iterator
|
Method Summary |
void |
addInput(VisualIterator input,
int index)
|
java.lang.Object[] |
getParameters()
Returns parameters. |
boolean |
hasNext()
Returns true if the iteration has more elements. |
java.lang.Object |
next()
Returns the next element in the iteration. |
void |
open()
Calls open on all input-Iterators and creates the Iterator
with the IteratorFunction. |
void |
remove()
Removes from the underlying collection the last element returned
by the iterator (optional operation). |
void |
removeInput(int index)
|
void |
setParameters(java.lang.Object[] parameters)
Sets parameters. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
newIterator
protected VisualIterator.IteratorFunction newIterator
iterator
protected java.util.Iterator iterator
parameters
protected java.lang.Object[] parameters
inputOf
protected VisualIterator inputOf
children
protected VisualIterator[] children
VisualIterator
public VisualIterator(VisualIterator.IteratorFunction newIterator,
int noOfChildren)
- Creates a new VisualIterator.
VisualIterator
public VisualIterator(VisualIterator.IteratorFunction newIterator)
addInput
public void addInput(VisualIterator input,
int index)
removeInput
public void removeInput(int index)
setParameters
public void setParameters(java.lang.Object[] parameters)
- Sets parameters.
getParameters
public java.lang.Object[] getParameters()
- Returns parameters.
open
public void open()
- Calls open on all input-Iterators and creates the Iterator
with the IteratorFunction.
hasNext
public boolean hasNext()
- Returns true if the iteration has more elements.
- Specified by:
- hasNext in interface java.util.Iterator
- Returns:
- true if the iterator has more elements
next
public java.lang.Object next()
throws java.util.NoSuchElementException
- Returns the next element in the iteration.
- Specified by:
- next in interface java.util.Iterator
- Returns:
- the next element in the iteration
- Throws:
- java.util.NoSuchElementException - iteration has no more elements.
remove
public void remove()
throws java.lang.IllegalStateException,
java.lang.UnsupportedOperationException
- Removes from the underlying collection the last element returned
by the iterator (optional operation).
- Specified by:
- remove in interface java.util.Iterator
- Throws:
- java.lang.IllegalStateException - if the next
method has not yet been called, or the remove method has already been called
after the last call to the next method.
- java.lang.UnsupportedOperationException - if the remove operation is
not supported by this Iterator.