edu.umass.cs.mallet.base.pipe.iterator
Class InstanceListIterator
java.lang.Object
edu.umass.cs.mallet.base.pipe.iterator.AbstractPipeInputIterator
edu.umass.cs.mallet.base.pipe.iterator.InstanceListIterator
- All Implemented Interfaces:
- java.util.Iterator, PipeInputIterator
- public class InstanceListIterator
- extends AbstractPipeInputIterator
This method feeds a pipeline from another InstanceList.
The new instances will have their pipe set to the pipe this
iterates into, and will carry no record of their previous origin.
New instance objects will be created; the originals are not modified.
This must be used with caution, for it can result in accidentally
piping the same instances through the same pipe twice, something that
MALLET otherwise tries to protect you from.
To save memory, in the future we might add a flag that (if set) would
cause this to remove the original instances from the InstanceList.
Created: Oct 31, 2004
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InstanceListIterator
public InstanceListIterator(InstanceList source)
nextInstance
public Instance nextInstance()
- Specified by:
nextInstance
in interface PipeInputIterator
- Specified by:
nextInstance
in class AbstractPipeInputIterator
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface java.util.Iterator
- Specified by:
hasNext
in class AbstractPipeInputIterator