it.unimi.dsi.mg4j.search
Class AbstractDocumentIterator.AbstractIntervalIterator

java.lang.Object
  extended by it.unimi.dsi.fastutil.objects.AbstractObjectIterator<Interval>
      extended by it.unimi.dsi.mg4j.search.AbstractDocumentIterator.AbstractIntervalIterator
All Implemented Interfaces:
ObjectIterator<Interval>, IntervalIterator, Iterator<Interval>
Direct Known Subclasses:
AbstractCompositeDocumentIterator.AbstractCompositeIndexIntervalIterator, AbstractCompositeDocumentIterator.AbstractCompositeIntervalIterator
Enclosing class:
AbstractDocumentIterator

protected abstract static class AbstractDocumentIterator.AbstractIntervalIterator
extends AbstractObjectIterator<Interval>
implements IntervalIterator


Field Summary
protected  Interval next
          The next document to be returned, if it has already been peeked at by hasNext(), or null.
 
Constructor Summary
protected AbstractDocumentIterator.AbstractIntervalIterator()
           
 
Method Summary
 boolean hasNext()
          Checks whether next has been already set; if not, peeks at the interval returned by nextInterval().
 Interval next()
          Deprecated. 
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectIterator
remove, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.unimi.dsi.mg4j.search.IntervalIterator
extent, intervalTerms, nextInterval, reset
 
Methods inherited from interface java.util.Iterator
remove
 

Field Detail

next

protected Interval next
The next document to be returned, if it has already been peeked at by hasNext(), or null.

Constructor Detail

AbstractDocumentIterator.AbstractIntervalIterator

protected AbstractDocumentIterator.AbstractIntervalIterator()
Method Detail

hasNext

public boolean hasNext()
Checks whether next has been already set; if not, peeks at the interval returned by nextInterval().

Specified by:
hasNext in interface Iterator<Interval>
Returns:
true if next is not null or if nextInterval() has returned a valid interval.

next

@Deprecated
public Interval next()
Deprecated. 

Checks whether there is an interval to be returned, sets next to null, and returns its previous value.

Specified by:
next in interface IntervalIterator
Specified by:
next in interface Iterator<Interval>
Returns:
the next interval, as cached by hasNext().
See Also:
IntervalIterator.nextInterval()