Class AbstractRTree.TreeWalker<Q extends RNode>

  • All Implemented Interfaces:
    java.util.Spliterator<T>
    Enclosing class:
    AbstractRTree<T extends RNode>

    protected class AbstractRTree.TreeWalker<Q extends RNode>
    extends java.util.Spliterators.AbstractSpliterator<T>
    This helper class remembers its place in the search tree and can find the next node to return and/or do an intelligent split of the tree.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Spliterator

        java.util.Spliterator.OfDouble, java.util.Spliterator.OfInt, java.util.Spliterator.OfLong, java.util.Spliterator.OfPrimitive<T extends java.lang.Object,​T_CONS extends java.lang.Object,​T_SPLITR extends java.util.Spliterator.OfPrimitive<T,​T_CONS,​T_SPLITR>>
    • Field Summary

      • Fields inherited from interface java.util.Spliterator

        CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long estimateSize()  
      boolean tryAdvance​(java.util.function.Consumer<? super T> action)  
      java.util.Spliterator<T> trySplit()
      Try to split the remaining items in half.
      • Methods inherited from class java.util.Spliterators.AbstractSpliterator

        characteristics
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Spliterator

        forEachRemaining, getComparator, getExactSizeIfKnown, hasCharacteristics
    • Method Detail

      • estimateSize

        public long estimateSize()
        Specified by:
        estimateSize in interface java.util.Spliterator<Q extends RNode>
        Overrides:
        estimateSize in class java.util.Spliterators.AbstractSpliterator<T extends RNode>
      • trySplit

        public java.util.Spliterator<T> trySplit()
        Try to split the remaining items in half.
        Specified by:
        trySplit in interface java.util.Spliterator<Q extends RNode>
        Overrides:
        trySplit in class java.util.Spliterators.AbstractSpliterator<T extends RNode>
        Returns:
        new Spliterator if we could split the remaining stream, otherwise null.
      • tryAdvance

        public boolean tryAdvance​(java.util.function.Consumer<? super T> action)