Constructor and Description |
---|
TreeIterator(LabelAwareSentenceIterator sentenceIterator,
java.util.List<java.lang.String> labels) |
TreeIterator(LabelAwareSentenceIterator sentenceIterator,
java.util.List<java.lang.String> labels,
TreeVectorizer treeVectorizer) |
TreeIterator(LabelAwareSentenceIterator sentenceIterator,
java.util.List<java.lang.String> labels,
TreeVectorizer treeVectorizer,
int batchSize) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Returns
true if the iteration has more elements. |
java.util.List<Tree> |
next()
Returns the next element in the iteration.
|
void |
remove()
Removes from the underlying collection the last element returned
by this iterator (optional operation).
|
public TreeIterator(LabelAwareSentenceIterator sentenceIterator, java.util.List<java.lang.String> labels, TreeVectorizer treeVectorizer, int batchSize)
public TreeIterator(LabelAwareSentenceIterator sentenceIterator, java.util.List<java.lang.String> labels, TreeVectorizer treeVectorizer)
public TreeIterator(LabelAwareSentenceIterator sentenceIterator, java.util.List<java.lang.String> labels) throws java.lang.Exception
java.lang.Exception
public boolean hasNext()
true
if the iteration has more elements.
(In other words, returns true
if next()
would
return an element rather than throwing an exception.)hasNext
in interface java.util.Iterator<java.util.List<Tree>>
true
if the iteration has more elementspublic java.util.List<Tree> next()
next
in interface java.util.Iterator<java.util.List<Tree>>
public void remove()
next()
. The behavior of an iterator
is unspecified if the underlying collection is modified while the
iteration is in progress in any way other than by calling this
method.remove
in interface java.util.Iterator<java.util.List<Tree>>
java.lang.UnsupportedOperationException
- if the remove
operation is not supported by this iteratorjava.lang.IllegalStateException
- if the next
method has not
yet been called, or the remove
method has already
been called after the last call to the next
method