Class TreeSpliterator.Depth<T>

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.lang.Cloneable, java.lang.Runnable, java.util.function.Consumer<T>, java.util.Spliterator<java.util.Map.Entry<java.lang.Integer,​T>>
    Enclosing class:
    TreeSpliterator<T,​U>

    static class TreeSpliterator.Depth<T>
    extends TreeSpliterator<T,​java.util.Map.Entry<java.lang.Integer,​T>>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int initialDepth  
      private java.util.function.BiFunction<java.lang.Integer,​T,​java.util.stream.Stream<T>> mapper  
      • Fields inherited from interface java.util.Spliterator

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

      Constructors 
      Constructor Description
      Depth​(T root, java.util.function.BiFunction<java.lang.Integer,​T,​java.util.stream.Stream<T>> mapper, int depth)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void forEachRemaining​(java.util.function.Consumer<? super java.util.Map.Entry<java.lang.Integer,​T>> action)  
      (package private) java.util.stream.Stream<T> getStart()  
      (package private) java.util.Map.Entry<java.lang.Integer,​T> getStartElement()  
      boolean tryAdvance​(java.util.function.Consumer<? super java.util.Map.Entry<java.lang.Integer,​T>> action)  
      • Methods inherited from class java.lang.Object

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

        andThen
      • Methods inherited from interface java.util.Spliterator

        getComparator, getExactSizeIfKnown, hasCharacteristics
    • Field Detail

      • mapper

        private final java.util.function.BiFunction<java.lang.Integer,​T,​java.util.stream.Stream<T>> mapper
      • initialDepth

        private final int initialDepth
    • Constructor Detail

      • Depth

        Depth​(T root,
              java.util.function.BiFunction<java.lang.Integer,​T,​java.util.stream.Stream<T>> mapper,
              int depth)
    • Method Detail

      • tryAdvance

        public boolean tryAdvance​(java.util.function.Consumer<? super java.util.Map.Entry<java.lang.Integer,​T>> action)
      • forEachRemaining

        public void forEachRemaining​(java.util.function.Consumer<? super java.util.Map.Entry<java.lang.Integer,​T>> action)
      • getStart

        java.util.stream.Stream<T> getStart()
        Specified by:
        getStart in class TreeSpliterator<T,​java.util.Map.Entry<java.lang.Integer,​T>>
      • getStartElement

        java.util.Map.Entry<java.lang.Integer,​T> getStartElement()
        Specified by:
        getStartElement in class TreeSpliterator<T,​java.util.Map.Entry<java.lang.Integer,​T>>