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>
asyncIterator
protected LabelAwareIterator
backedIterator
protected int
bufferSize
-
Constructor Summary
Constructors Constructor Description AsyncLabelAwareIterator(@NonNull LabelAwareIterator iterator, int bufferSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LabelsSource
getLabelsSource()
boolean
hasNext()
boolean
hasNextDocument()
LabelledDocument
next()
LabelledDocument
nextDocument()
void
remove()
void
reset()
void
shutdown()
-
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:
remove
in interfaceIterator<LabelledDocument>
-
hasNextDocument
public boolean hasNextDocument()
- Specified by:
hasNextDocument
in interfaceLabelAwareIterator
-
nextDocument
public LabelledDocument nextDocument()
- Specified by:
nextDocument
in interfaceLabelAwareIterator
-
reset
public void reset()
- Specified by:
reset
in interfaceLabelAwareIterator
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceLabelAwareIterator
-
getLabelsSource
public LabelsSource getLabelsSource()
- Specified by:
getLabelsSource
in interfaceLabelAwareIterator
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceIterator<LabelledDocument>
-
next
public LabelledDocument next() throws NoSuchElementException
- Specified by:
next
in interfaceIterator<LabelledDocument>
- Throws:
NoSuchElementException
-
-