Class Variable

java.lang.Object
com.semedy.reasoner.api.logic.Variable
All Implemented Interfaces:
Serializable

public class Variable extends Object implements Serializable
represents a variable.
The symbol code of super class InternalTerm is used as position
See Also:
  • Constructor Details

    • Variable

      public Variable(String name)
  • Method Details

    • getName

      public String getName()
      get the variable name
      Returns:
      variable name
    • setPosition

      public void setPosition(int pos)
      Set the position within the rule.
      The variable positions must be unique, beginning at 0 and without gaps
      Parameters:
      pos -
    • getPosition

      public int getPosition()
      Get the position within the rule.
      The variable positions must be unique, beginning at 0 and without gaps
      Returns:
      position of variable within rule
    • getRuleIdentifier

      public String getRuleIdentifier()
      Get rule identifier.
      Necessary to distinguish variable with same names in different rules.
      Necessary for unification
      Returns:
      unique identifier of rule
    • isGround

      public boolean isGround()
      is always false
      Returns:
    • getPositionFromName

      public int getPositionFromName()
      get variable position from name
      Returns:
    • toString

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public Variable clone()