Class AbstractIntervalDocumentIterator

    • Field Detail

      • indices

        protected final ReferenceSet<Index> indices
        The set of indices involved in this iterator.
      • soleIndex

        protected final Index soleIndex
        If not null, the sole index involved in this document iterator.
      • soleIntervalIterator

        protected final IntervalIterator soleIntervalIterator
        If not null, the sole interval iterator involved in this document iterator.
      • currentIterators

        protected final Index2IntervalIteratorMap currentIterators
        A map from indices to the iterators returned for the current document. The key set may not contain an index because the related iterator has never been requested. Note that implementing subclasses might use this map just to store the result of DocumentIterator.intervalIterators(), leaving the tracking of current iterators to some other mechanism.
    • Constructor Detail

      • AbstractIntervalDocumentIterator

        protected AbstractIntervalDocumentIterator​(int n,
                                                   ReferenceSet<Index> indices,
                                                   boolean allIndexIterators,
                                                   Object arg)
        Creates a new instance.
        Parameters:
        n - the number of underlying iterators.
        indices - the set of indices appearing in the underlying iterators.
        allIndexIterators - whether all underlying iterators are index iterators.
        arg - an argument that will be passed to getIntervalIterator(Index, int, boolean, Object).
    • Method Detail

      • getIntervalIterator

        protected abstract IntervalIterator getIntervalIterator​(Index index,
                                                                int n,
                                                                boolean allIndexIterators,
                                                                Object arg)
        Creates an interval iterator suitable for this AbstractIntervalDocumentIterator.
        Parameters:
        index - the reference index for the iterator, or null.
        n - the number of underlying or component iterators.
        allIndexIterators - whether all underlying or component iterators are index iterators.
        arg - an optional argument.
        Returns:
        an interval iterator suitable for this AbstractIntervalDocumentIterator.
      • indices

        public ReferenceSet<Index> indices()
        Description copied from interface: DocumentIterator
        Returns the set of indices over which this iterator is built.
        Returns:
        the set of indices over which this iterator is built.
      • allIndexIterators

        protected static boolean allIndexIterators​(DocumentIterator... documentIterator)
        A commodity static methods that checks whether all specified document iterators are actually index iterators.
        Parameters:
        documentIterator - a list of document iterators.
        Returns:
        true if all elements of documentIterator are actually index iterators.