Class Mapping


  • public class Mapping
    extends java.lang.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 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)
      • getParentRestriction

        public Vertex getParentRestriction​(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()
      • 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)