Class AbstractRule

java.lang.Object
fr.lirmm.graphik.integraal.core.AbstractRule
All Implemented Interfaces:
Rule, Comparable<Rule>
Direct Known Subclasses:
ConjunctiveQueryRuleAdapter, DefaultRule

public abstract class AbstractRule extends Object implements Rule
Base implementation of Rule with shared equality and rendering logic.
Author:
Clément Sipieter (INRIA) <clement@6pi.fr>
  • Constructor Details

    • AbstractRule

      protected AbstractRule()
      Creates an abstract rule base implementation.
  • Method Details

    • compareTo

      public int compareTo(Rule other)
      Specified by:
      compareTo in interface Comparable<Rule>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • appendTo

      public void appendTo(StringBuilder builder)
    • equals

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

      public boolean equals(Rule other)
      Compares this rule with another rule using label, body, and head equality.
      Parameters:
      other - the other rule to compare with
      Returns:
      true if both rules describe the same label, body, and head
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object