com.varankin.io.stream
Class StreamCutter<Component extends Receiver<Part>,Part>
java.lang.Object
com.varankin.io.stream.StreamCutter<Component,Part>
- All Implemented Interfaces:
- java.lang.Iterable<Component>
public abstract class StreamCutter<Component extends Receiver<Part>,Part>
- extends java.lang.Object
- implements java.lang.Iterable<Component>
General purpose parser, trying to construct Component's from Part's.
Where multiple options found, parser chooses Component with high
priority, as indicated by provider of candidate parts. Parser
starts consuming part(s) on using its iterator.
- Author:
- © 2009 Nikolai Varankine
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StreamCutter
public StreamCutter(java.lang.Iterable<Part> aSource)
- Parameters:
aSource
- source of parts to construct component(s).
next
protected abstract java.util.List<Component> next()
- Returns:
- ordered sequence of new candidates to fill in, in descending priority.
Null means no more candidates
next
protected java.util.List<Component> next(Component component)
iterator
public java.util.Iterator<Component> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<Component extends Receiver<Part>>