Package graphql.schema.diffing
Class Mapping
java.lang.Object
graphql.schema.diffing.Mapping
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).
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Mapping
(Map<Vertex, Vertex> fixedParentRestrictions, com.google.common.collect.BiMap<Vertex, Vertex> fixedMappings, List<Vertex> fixedSourceList, List<Vertex> fixedTargetList, com.google.common.collect.BiMap<Vertex, Vertex> map, List<Vertex> sourceList, List<Vertex> targetList) -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
boolean
containsSource
(Vertex sourceVertex) boolean
containsTarget
(Vertex targetVertex) copy()
extendMapping
(Vertex source, Vertex target) int
void
forEachNonFixedSourceAndTarget
(BiConsumer<? super Vertex, ? super Vertex> consumer) void
forEachNonFixedTarget
(Consumer<? super Vertex> action) void
forEachTarget
(Consumer<? super Vertex> action) getSource
(int i) getTarget
(int i) boolean
invert()
static Mapping
newMapping
(Map<Vertex, Vertex> fixedParentRestrictions, com.google.common.collect.BiMap<Vertex, Vertex> fixedMappings, List<Vertex> fixedSourceList, List<Vertex> fixedTargetList) int
int
size()
-
Field Details
-
fixedParentRestrictions
-
fixedMappings
-
fixedSourceList
-
fixedTargetList
-
map
-
sourceList
-
targetList
-
-
Constructor Details
-
Mapping
-
-
Method Details
-
newMapping
-
hasParentRestriction
-
getParentRestriction
-
getSource
-
getTarget
-
getSource
-
getTarget
-
containsSource
-
containsTarget
-
contains
-
size
public int size() -
fixedSize
public int fixedSize() -
nonFixedSize
public int nonFixedSize() -
add
-
copyMappingWithLastElementRemoved
-
copy
-
extendMapping
-
forEachTarget
-
forEachNonFixedTarget
-
forEachNonFixedSourceAndTarget
-
invert
-