Package com.semedy.reasoner.api.logic
Class Variable
java.lang.Object
com.semedy.reasoner.api.logic.Variable
- All Implemented Interfaces:
Serializable
represents a variable.
The symbol code of super class InternalTerm is used as position
The symbol code of super class InternalTerm is used as position
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
getName()
get the variable nameint
Get the position within the rule.int
get variable position from nameGet rule identifier.
Necessary to distinguish variable with same names in different rules.
Necessary for unificationint
hashCode()
boolean
isGround()
is always falsevoid
setPosition
(int pos) Set the position within the rule.toString()
-
Constructor Details
-
Variable
-
-
Method Details
-
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
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
-
equals
-
hashCode
public int hashCode() -
clone
-