Package graphql.util

Class NodeMultiZipper<T>


  • @PublicApi
    public class NodeMultiZipper<T>
    extends java.lang.Object
    • Field Detail

      • commonRoot

        private final T commonRoot
      • zippers

        private final com.google.common.collect.ImmutableList<NodeZipper<T>> zippers
    • Constructor Detail

      • NodeMultiZipper

        public NodeMultiZipper​(T commonRoot,
                               java.util.List<NodeZipper<T>> zippers,
                               NodeAdapter<T> nodeAdapter)
      • NodeMultiZipper

        private NodeMultiZipper​(T commonRoot,
                                java.util.List<NodeZipper<T>> zippers,
                                NodeAdapter<T> nodeAdapter,
                                java.lang.Object dummy)
    • Method Detail

      • newNodeMultiZipperTrusted

        public static <T> NodeMultiZipper<T> newNodeMultiZipperTrusted​(T commonRoot,
                                                                       java.util.List<NodeZipper<T>> zippers,
                                                                       NodeAdapter<T> nodeAdapter)
      • toRootNode

        public T toRootNode()
        Returns:
        can be null if the root node is marked as deleted
      • getCommonRoot

        public T getCommonRoot()
      • getZippers

        public java.util.List<NodeZipper<T>> getZippers()
      • size

        public int size()
      • getZipperForNode

        public NodeZipper<T> getZipperForNode​(T node)
      • withReplacedZipperForNode

        public NodeMultiZipper<T> withReplacedZipperForNode​(T currentNode,
                                                            T newNode)
      • getDeepestZippers

        private java.util.List<NodeZipper<T>> getDeepestZippers​(java.util.Set<NodeZipper<T>> zippers)
      • zipperWithSameParent

        private java.util.Map<T,​com.google.common.collect.ImmutableList<NodeZipper<T>>> zipperWithSameParent​(java.util.List<NodeZipper<T>> zippers)