it.unimi.dsi.mg4j.search
Class IntervalIterators.EmptyIntervalIterator

java.lang.Object
  extended byit.unimi.dsi.fastutil.objects.AbstractObjectIterator
      extended byit.unimi.dsi.fastutil.objects.AbstractObjectBidirectionalIterator
          extended byit.unimi.dsi.fastutil.objects.AbstractObjectListIterator
              extended byit.unimi.dsi.fastutil.Iterators.EmptyIterator
                  extended byit.unimi.dsi.mg4j.search.IntervalIterators.EmptyIntervalIterator
All Implemented Interfaces:
BidirectionalIterator, BooleanBidirectionalIterator, BooleanIterator, BooleanListIterator, ByteBidirectionalIterator, ByteIterator, ByteListIterator, CharBidirectionalIterator, CharIterator, CharListIterator, DoubleBidirectionalIterator, DoubleIterator, DoubleListIterator, FloatBidirectionalIterator, FloatIterator, FloatListIterator, IntBidirectionalIterator, IntervalIterator, IntIterator, IntListIterator, Iterator, ListIterator, LongBidirectionalIterator, LongIterator, LongListIterator, ObjectBidirectionalIterator, ObjectIterator, ObjectListIterator, ShortBidirectionalIterator, ShortIterator, ShortListIterator
Enclosing class:
IntervalIterators

public static class IntervalIterators.EmptyIntervalIterator
extends Iterators.EmptyIterator
implements IntervalIterator

An iterator returning no intervals.

This class may be useful to implement your own in case you subclass IntervalIterator.


Field Summary
 
Fields inherited from class it.unimi.dsi.fastutil.Iterators.EmptyIterator
serialVersionUID
 
Constructor Summary
protected IntervalIterators.EmptyIntervalIterator()
           
 
Method Summary
 int extent()
          Returns an approximation of a lower bound for the length of an interval returned by this iterator.
 Interval nextInterval()
          Returns the next interval in the sequence.
 void reset()
          Resets the internal state of this iterator for a new document.
 
Methods inherited from class it.unimi.dsi.fastutil.Iterators.EmptyIterator
add, add, add, add, add, add, add, add, clone, hasNext, hasPrevious, next, nextBoolean, nextByte, nextChar, nextDouble, nextFloat, nextIndex, nextInt, nextLong, nextShort, previous, previousBoolean, previousByte, previousChar, previousDouble, previousFloat, previousIndex, previousInt, previousLong, previousShort, set, set, set, set, set, set, set, set, skip
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectListIterator
add, set
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectBidirectionalIterator
back
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectIterator
remove
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 
Methods inherited from interface java.util.ListIterator
add, remove, set
 
Methods inherited from interface it.unimi.dsi.fastutil.booleans.BooleanBidirectionalIterator
back
 
Methods inherited from interface it.unimi.dsi.fastutil.bytes.ByteBidirectionalIterator
back
 
Methods inherited from interface it.unimi.dsi.fastutil.shorts.ShortBidirectionalIterator
back
 
Methods inherited from interface it.unimi.dsi.fastutil.ints.IntBidirectionalIterator
back
 
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongBidirectionalIterator
back
 
Methods inherited from interface it.unimi.dsi.fastutil.chars.CharBidirectionalIterator
back
 
Methods inherited from interface it.unimi.dsi.fastutil.floats.FloatBidirectionalIterator
back
 
Methods inherited from interface it.unimi.dsi.fastutil.doubles.DoubleBidirectionalIterator
back
 
Methods inherited from interface it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator
back
 

Constructor Detail

IntervalIterators.EmptyIntervalIterator

protected IntervalIterators.EmptyIntervalIterator()
Method Detail

nextInterval

public Interval nextInterval()
Description copied from interface: IntervalIterator
Returns the next interval in the sequence.

A call to this method is equivalent to (Interval)next().

Specified by:
nextInterval in interface IntervalIterator
Returns:
the next interval in the sequence.

extent

public int extent()
Description copied from interface: IntervalIterator
Returns an approximation of a lower bound for the length of an interval returned by this iterator.

Specified by:
extent in interface IntervalIterator
Returns:
an approximation of a lower bound for the length of an interval.

reset

public void reset()
Description copied from interface: IntervalIterator
Resets the internal state of this iterator for a new document.

To reduce object creation, interval iterators are usually created in a lazy fashion by document iterator when they are needed. However, this implies that every time the document iterator is moved, some internal state of the interval iterator must be reset (e.g., because on the new document some of the component interval iterators are now IntervalIterators.TRUE).

Specified by:
reset in interface IntervalIterator