Class RangeIterator<K extends java.lang.Comparable<K>,​T extends CombinedValue<K>>

    • Method Detail

      • getMinimum

        public final K getMinimum()
      • getCurrent

        public final K getCurrent()
      • getMaximum

        public final K getMaximum()
      • getCount

        public final long getCount()
      • skipTo

        public final T skipTo​(K nextToken)
        When called, this iterators current position should be skipped forwards until finding either: 1) an element equal to or bigger than next 2) the end of the iterator
        Parameters:
        nextToken - value to skip the iterator forward until matching
        Returns:
        The next current token after the skip was performed
      • performSkipTo

        protected abstract void performSkipTo​(K nextToken)
      • recomputeNext

        protected T recomputeNext()
      • isOverlapping

        protected static <K extends java.lang.Comparable<K>,​D extends CombinedValue<K>> boolean isOverlapping​(K min,
                                                                                                                    K max,
                                                                                                                    RangeIterator<K,​D> b)
        Ranges are overlapping the following cases: * When they have a common subrange: min b.current max b.max +---------|--------------+------------| b.current min max b.max |--------------+---------+------------| min b.current b.max max +----------|-------------|------------+ If either range is empty, they're disjoint.