Class Mapping

java.lang.Object
graphql.schema.diffing.Mapping

public class Mapping extends Object
A mapping (in the math sense) from a list of vertices to another list of vertices. A mapping can semantically mean a change, but doesn't have to: a vertex can be mapped to the same vertex (semantically the same, Java object wise they are different).
  • Method Details

    • newMapping

      public static Mapping newMapping(Map<Vertex,Vertex> fixedParentRestrictions, com.google.common.collect.BiMap<Vertex,Vertex> fixedMappings, List<Vertex> fixedSourceList, List<Vertex> fixedTargetList)
    • hasParentRestriction

      public boolean hasParentRestriction(Vertex v)
    • getParentRestriction

      public Vertex getParentRestriction(Vertex v)
    • getSource

      public Vertex getSource(Vertex target)
    • getTarget

      public Vertex getTarget(Vertex source)
    • getSource

      public Vertex getSource(int i)
    • getTarget

      public Vertex getTarget(int i)
    • containsSource

      public boolean containsSource(Vertex sourceVertex)
    • containsTarget

      public boolean containsTarget(Vertex targetVertex)
    • contains

      public boolean contains(Vertex vertex, boolean sourceOrTarget)
    • size

      public int size()
    • fixedSize

      public int fixedSize()
    • nonFixedSize

      public int nonFixedSize()
    • add

      public void add(Vertex source, Vertex target)
    • copyMappingWithLastElementRemoved

      public Mapping copyMappingWithLastElementRemoved()
    • copy

      public Mapping copy()
    • extendMapping

      public Mapping extendMapping(Vertex source, Vertex target)
    • forEachTarget

      public void forEachTarget(Consumer<? super Vertex> action)
    • forEachNonFixedTarget

      public void forEachNonFixedTarget(Consumer<? super Vertex> action)
    • forEachNonFixedSourceAndTarget

      public void forEachNonFixedSourceAndTarget(BiConsumer<? super Vertex,? super Vertex> consumer)
    • invert

      public Mapping invert()