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 classBasicLabelAwareIterator.Builder
-
Field Summary
Fields Modifier and Type Field Description protected LabelAwareIteratorbackendIteratorprotected AtomicLongdocumentPositionprotected LabelsSourcegenerator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LabelsSourcegetLabelsSource()This method returns LabelsSource instance, containing all labels derived from this iteratorbooleanhasNext()booleanhasNextDocument()This method checks, if there's more LabelledDocumentsLabelledDocumentnext()LabelledDocumentnextDocument()This method returns next LabelledDocumentvoidremove()voidreset()This methods resets LabelAwareIteratorvoidshutdown()-
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:
hasNextDocumentin interfaceLabelAwareIterator- Returns:
-
nextDocument
public LabelledDocument nextDocument()
This method returns next LabelledDocument- Specified by:
nextDocumentin interfaceLabelAwareIterator- Returns:
-
reset
public void reset()
This methods resets LabelAwareIterator- Specified by:
resetin interfaceLabelAwareIterator
-
getLabelsSource
public LabelsSource getLabelsSource()
This method returns LabelsSource instance, containing all labels derived from this iterator- Specified by:
getLabelsSourcein interfaceLabelAwareIterator- Returns:
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfaceIterator<LabelledDocument>
-
next
public LabelledDocument next()
- Specified by:
nextin interfaceIterator<LabelledDocument>
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceLabelAwareIterator
-
remove
public void remove()
- Specified by:
removein interfaceIterator<LabelledDocument>
-
-