Class BasicLabelAwareIterator
- java.lang.Object
-
- org.deeplearning4j.text.documentiterator.BasicLabelAwareIterator
-
- All Implemented Interfaces:
Iterator<LabelledDocument>
,LabelAwareIterator
public class BasicLabelAwareIterator extends Object implements LabelAwareIterator
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BasicLabelAwareIterator.Builder
-
Field Summary
Fields Modifier and Type Field Description protected LabelAwareIterator
backendIterator
protected AtomicLong
documentPosition
protected LabelsSource
generator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LabelsSource
getLabelsSource()
This method returns LabelsSource instance, containing all labels derived from this iteratorboolean
hasNext()
boolean
hasNextDocument()
This method checks, if there's more LabelledDocumentsLabelledDocument
next()
LabelledDocument
nextDocument()
This method returns next LabelledDocumentvoid
remove()
void
reset()
This methods resets LabelAwareIteratorvoid
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
-
documentPosition
protected AtomicLong documentPosition
-
generator
protected LabelsSource generator
-
backendIterator
protected transient LabelAwareIterator backendIterator
-
-
Method Detail
-
hasNextDocument
public boolean hasNextDocument()
This method checks, if there's more LabelledDocuments- Specified by:
hasNextDocument
in interfaceLabelAwareIterator
- Returns:
-
nextDocument
public LabelledDocument nextDocument()
This method returns next LabelledDocument- Specified by:
nextDocument
in interfaceLabelAwareIterator
- Returns:
-
reset
public void reset()
This methods resets LabelAwareIterator- Specified by:
reset
in interfaceLabelAwareIterator
-
getLabelsSource
public LabelsSource getLabelsSource()
This method returns LabelsSource instance, containing all labels derived from this iterator- Specified by:
getLabelsSource
in interfaceLabelAwareIterator
- Returns:
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceIterator<LabelledDocument>
-
next
public LabelledDocument next()
- Specified by:
next
in interfaceIterator<LabelledDocument>
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceLabelAwareIterator
-
remove
public void remove()
- Specified by:
remove
in interfaceIterator<LabelledDocument>
-
-