org.pelds.rules
Class Rule
java.lang.Object
org.pelds.rules.Rule
public class Rule
- extends java.lang.Object
Class for holding rule instances, rules consist of a name and two lists of
atoms (predicates), the antecedent list and the consequent list.
- Author:
- Hannes Muehleisen (hannes@muehleisen.org)
Constructor Summary |
Rule()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Rule
public Rule()
getUsedVariables
public java.util.Set<java.lang.String> getUsedVariables()
- Get all variables used in this rule
- Returns:
- List of variable names
toString
public java.lang.String toString()
- Convert this rule and its atoms to a String representation
- Overrides:
toString
in class java.lang.Object
- See Also:
Object.toString()
getName
public java.lang.String getName()
setName
public void setName(java.lang.String name)
getAntAtoms
public java.util.ArrayList<RuleAtom> getAntAtoms()
setAntAtoms
public void setAntAtoms(java.util.ArrayList<RuleAtom> antAtoms)
getConAtoms
public java.util.ArrayList<RuleAtom> getConAtoms()
setConAtoms
public void setConAtoms(java.util.ArrayList<RuleAtom> conAtoms)
addAntAtom
public void addAntAtom(RuleAtom arg)
addConAtom
public void addConAtom(RuleAtom arg)