Class InputKeyImplication

java.lang.Object
tools.refinery.interpreter.matchers.context.InputKeyImplication

public final class InputKeyImplication extends Object
Data object representing the implication of an input key, in use cases including edge supertypes, edge opposites, node type constraints, etc.

Each instance tuple of the implying input key (if given) implies the presence of an instance tuple of the implied input key consisting of elements of the original tuple at given positions. When the input key is null, it is not an input constraint but some other source that implies input keys.

The implication is an immutable data object.

  • Constructor Details

    • InputKeyImplication

      public InputKeyImplication(IInputKey implyingKey, IInputKey impliedKey, List<Integer> implyingIndices)
      Parameters:
      implyingKey - instance tuples of this input key imply an instance tuple of the other key.
      impliedKey - instance tuple of this input key is implied by the other key.
      implyingIndices - the implied instance tuple consists of the values in the implying tuple at these indices.
  • Method Details

    • getImplyingKey

      public IInputKey getImplyingKey()
      Optional. Instance tuples of this input key imply an instance tuple of another key. Sometimes it is not an input key that implies other input keys, so this attribute can be null.
    • getImpliedKey

      public IInputKey getImpliedKey()
      An instance tuple of this input key is implied by another key.
    • getImpliedIndices

      public List<Integer> getImpliedIndices()
      The implied instance tuple consists of the values in the implying tuple at these indices.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object