Package graphql.util

Class Traverser<T>


  • public class Traverser<T>
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> Traverser<T> breadthFirst​(java.util.function.Function<? super T,​? extends java.util.List<T>> getChildren)  
      static <T> Traverser<T> breadthFirst​(java.util.function.Function<? super T,​? extends java.util.List<T>> getChildren, java.lang.Object sharedContextData)  
      static <T> Traverser<T> breadthFirst​(java.util.function.Function<? super T,​? extends java.util.List<T>> getChildren, java.lang.Object sharedContextData, java.lang.Object initialAccumulate)  
      static <T> Traverser<T> breadthFirstWithNamedChildren​(java.util.function.Function<? super T,​java.util.Map<java.lang.String,​? extends java.util.List<T>>> getNamedChildren, java.lang.Object sharedContextData, java.lang.Object initialAccumulate)  
      static <T> Traverser<T> depthFirst​(java.util.function.Function<? super T,​? extends java.util.List<T>> getChildren)  
      static <T> Traverser<T> depthFirst​(java.util.function.Function<? super T,​? extends java.util.List<T>> getChildren, java.lang.Object sharedContextData)  
      static <T> Traverser<T> depthFirst​(java.util.function.Function<? super T,​? extends java.util.List<T>> getChildren, java.lang.Object sharedContextData, java.lang.Object initialAccumulate)  
      static <T> Traverser<T> depthFirstWithNamedChildren​(java.util.function.Function<? super T,​java.util.Map<java.lang.String,​? extends java.util.List<T>>> getNamedChildren, java.lang.Object sharedContextData, java.lang.Object initialAccumulate)  
      Traverser<T> rootVar​(java.lang.Class<?> key, java.lang.Object value)  
      Traverser<T> rootVars​(java.util.Map<java.lang.Class<?>,​java.lang.Object> rootVars)  
      TraverserResult traverse​(java.util.Collection<? extends T> roots, TraverserVisitor<? super T> visitor)  
      TraverserResult traverse​(T root, TraverserVisitor<? super T> visitor)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • rootVars

        public Traverser<T> rootVars​(java.util.Map<java.lang.Class<?>,​java.lang.Object> rootVars)
      • rootVar

        public Traverser<T> rootVar​(java.lang.Class<?> key,
                                    java.lang.Object value)
      • depthFirst

        public static <T> Traverser<T> depthFirst​(java.util.function.Function<? super T,​? extends java.util.List<T>> getChildren)
      • depthFirst

        public static <T> Traverser<T> depthFirst​(java.util.function.Function<? super T,​? extends java.util.List<T>> getChildren,
                                                  java.lang.Object sharedContextData)
      • depthFirst

        public static <T> Traverser<T> depthFirst​(java.util.function.Function<? super T,​? extends java.util.List<T>> getChildren,
                                                  java.lang.Object sharedContextData,
                                                  java.lang.Object initialAccumulate)
      • depthFirstWithNamedChildren

        public static <T> Traverser<T> depthFirstWithNamedChildren​(java.util.function.Function<? super T,​java.util.Map<java.lang.String,​? extends java.util.List<T>>> getNamedChildren,
                                                                   java.lang.Object sharedContextData,
                                                                   java.lang.Object initialAccumulate)
      • breadthFirst

        public static <T> Traverser<T> breadthFirst​(java.util.function.Function<? super T,​? extends java.util.List<T>> getChildren)
      • breadthFirst

        public static <T> Traverser<T> breadthFirst​(java.util.function.Function<? super T,​? extends java.util.List<T>> getChildren,
                                                    java.lang.Object sharedContextData)
      • breadthFirst

        public static <T> Traverser<T> breadthFirst​(java.util.function.Function<? super T,​? extends java.util.List<T>> getChildren,
                                                    java.lang.Object sharedContextData,
                                                    java.lang.Object initialAccumulate)
      • breadthFirstWithNamedChildren

        public static <T> Traverser<T> breadthFirstWithNamedChildren​(java.util.function.Function<? super T,​java.util.Map<java.lang.String,​? extends java.util.List<T>>> getNamedChildren,
                                                                     java.lang.Object sharedContextData,
                                                                     java.lang.Object initialAccumulate)