Class AsyncLabelAwareIterator
- java.lang.Object
-
- org.deeplearning4j.text.documentiterator.AsyncLabelAwareIterator
-
- All Implemented Interfaces:
Iterator<LabelledDocument>,LabelAwareIterator
public class AsyncLabelAwareIterator extends Object implements LabelAwareIterator, Iterator<LabelledDocument>
-
-
Field Summary
Fields Modifier and Type Field Description protected AsyncIterator<LabelledDocument>asyncIteratorprotected LabelAwareIteratorbackedIteratorprotected intbufferSize
-
Constructor Summary
Constructors Constructor Description AsyncLabelAwareIterator(@NonNull LabelAwareIterator iterator, int bufferSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LabelsSourcegetLabelsSource()booleanhasNext()booleanhasNextDocument()LabelledDocumentnext()LabelledDocumentnextDocument()voidremove()voidreset()voidshutdown()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Field Detail
-
backedIterator
protected LabelAwareIterator backedIterator
-
asyncIterator
protected AsyncIterator<LabelledDocument> asyncIterator
-
bufferSize
protected int bufferSize
-
-
Constructor Detail
-
AsyncLabelAwareIterator
public AsyncLabelAwareIterator(@NonNull @NonNull LabelAwareIterator iterator, int bufferSize)
-
-
Method Detail
-
remove
public void remove()
- Specified by:
removein interfaceIterator<LabelledDocument>
-
hasNextDocument
public boolean hasNextDocument()
- Specified by:
hasNextDocumentin interfaceLabelAwareIterator
-
nextDocument
public LabelledDocument nextDocument()
- Specified by:
nextDocumentin interfaceLabelAwareIterator
-
reset
public void reset()
- Specified by:
resetin interfaceLabelAwareIterator
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceLabelAwareIterator
-
getLabelsSource
public LabelsSource getLabelsSource()
- Specified by:
getLabelsSourcein interfaceLabelAwareIterator
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfaceIterator<LabelledDocument>
-
next
public LabelledDocument next() throws NoSuchElementException
- Specified by:
nextin interfaceIterator<LabelledDocument>- Throws:
NoSuchElementException
-
-