public class IntervalIterators extends Object
|Modifier and Type||Class and Description|
|Modifier and Type||Field and Description|
A singleton empty interval iterator.
A singleton iterator representing maximum truth.
|Modifier and Type||Method and Description|
Returns a set containing the intervals enumerated by the specified interval iterators: iteration on the set is guarantee to return the intervals in the same order in which they were enumerated.
public static final IntervalIterator TRUE
This iterator is a placeholder for an iterator returning just
The antichain formed by the empty interval is the top element of the lattice of antichains, and
thus represents the highest truth. Since, however,
is a singleton that slightly violates the
Interval invariants, an iterator actually
EMPTY_INTERVAL would cause severe problems in all algorithms manipulating
TRUE is treated separately and is never actually used in
an algorithm on interval antichains (also because, albeit it claims to have elements,
it will return
Warning: Before 4.0, an
IndexIterator by convention would have returned
was called with an argument that was not the key index.
Now it returns
public static final IntervalIterator FALSE
The main usefulness of this iterator is as a singleton: in some circumstances you have
to return an empty iterator, and since it is by definition stateless, it is a pity
to create a new object (the same considerations led to
This iterator is used by document iterators as a placeholder
DocumentIterator.intervalIterator(it.unimi.di.mg4j.index.Index) is called
on an index for which there are not intervals. For instance, an
IndexIterator by convention returns
is called with an argument that is not the key index.
Before 4.0, the same placeholder role was held by
public static ObjectSet<Interval> pour(IntervalIterator intervalIterator) throws IOException
intervalIterator- an interval iterator.