Package graphql.schema.diffing
Class Mapping
- java.lang.Object
-
- graphql.schema.diffing.Mapping
-
public class Mapping extends java.lang.ObjectA 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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Vertex source, Vertex target)booleancontains(Vertex vertex, boolean sourceOrTarget)booleancontainsSource(Vertex sourceVertex)booleancontainsTarget(Vertex targetVertex)Mappingcopy()MappingcopyMappingWithLastElementRemoved()MappingextendMapping(Vertex source, Vertex target)intfixedSize()voidforEachNonFixedSourceAndTarget(java.util.function.BiConsumer<? super Vertex,? super Vertex> consumer)voidforEachNonFixedTarget(java.util.function.Consumer<? super Vertex> action)voidforEachTarget(java.util.function.Consumer<? super Vertex> action)VertexgetParentRestriction(Vertex v)VertexgetSource(int i)VertexgetSource(Vertex target)VertexgetTarget(int i)VertexgetTarget(Vertex source)booleanhasParentRestriction(Vertex v)Mappinginvert()static MappingnewMapping(java.util.Map<Vertex,Vertex> fixedParentRestrictions, com.google.common.collect.BiMap<Vertex,Vertex> fixedMappings, java.util.List<Vertex> fixedSourceList, java.util.List<Vertex> fixedTargetList)intnonFixedSize()intsize()
-
-
-
Method Detail
-
newMapping
public static Mapping newMapping(java.util.Map<Vertex,Vertex> fixedParentRestrictions, com.google.common.collect.BiMap<Vertex,Vertex> fixedMappings, java.util.List<Vertex> fixedSourceList, java.util.List<Vertex> fixedTargetList)
-
hasParentRestriction
public boolean hasParentRestriction(Vertex v)
-
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()
-
copyMappingWithLastElementRemoved
public Mapping copyMappingWithLastElementRemoved()
-
copy
public Mapping copy()
-
forEachTarget
public void forEachTarget(java.util.function.Consumer<? super Vertex> action)
-
forEachNonFixedTarget
public void forEachNonFixedTarget(java.util.function.Consumer<? super Vertex> action)
-
forEachNonFixedSourceAndTarget
public void forEachNonFixedSourceAndTarget(java.util.function.BiConsumer<? super Vertex,? super Vertex> consumer)
-
invert
public Mapping invert()
-
-