org.pelds.rules
Class Rule

java.lang.Object
  extended by 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()
           
 
Method Summary
 void addAntAtom(RuleAtom arg)
           
 void addConAtom(RuleAtom arg)
           
 java.util.ArrayList<RuleAtom> getAntAtoms()
           
 java.util.ArrayList<RuleAtom> getConAtoms()
           
 java.lang.String getName()
           
 java.util.Set<java.lang.String> getUsedVariables()
          Get all variables used in this rule
 void setAntAtoms(java.util.ArrayList<RuleAtom> antAtoms)
           
 void setConAtoms(java.util.ArrayList<RuleAtom> conAtoms)
           
 void setName(java.lang.String name)
           
 java.lang.String toString()
          Convert this rule and its atoms to a String representation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Rule

public Rule()
Method Detail

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)