Package jadex.rules.rulesystem.rules
Class Rule
- java.lang.Object
-
- jadex.rules.rulesystem.rules.Rule
-
-
Field Summary
Fields Modifier and Type Field Description protected IAction
action
The action.protected ICondition
condition
The condition.protected java.lang.String
name
The name.protected IPriorityEvaluator
priority
The priority evaluator.
-
Constructor Summary
Constructors Constructor Description Rule(java.lang.String name, ICondition condition, IAction action)
Create a new rule.Rule(java.lang.String name, ICondition condition, IAction action, IPriorityEvaluator priority)
Create a new rule.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Test for equality.IAction
getAction()
Get the action.ICondition
getCondition()
Get the condition.java.lang.String
getName()
Get the rule name.IPriorityEvaluator
getPriorityEvaluator()
Get the priority.int
hashCode()
Compute the hash code.java.lang.String
toString()
Create a string representation of the rule.
-
-
-
Field Detail
-
name
protected java.lang.String name
The name.
-
condition
protected ICondition condition
The condition.
-
action
protected IAction action
The action.
-
priority
protected IPriorityEvaluator priority
The priority evaluator.
-
-
Constructor Detail
-
Rule
public Rule(java.lang.String name, ICondition condition, IAction action)
Create a new rule.- Parameters:
name
- The name.condition
- The condition.action
- The action.
-
Rule
public Rule(java.lang.String name, ICondition condition, IAction action, IPriorityEvaluator priority)
Create a new rule.- Parameters:
name
- The name.condition
- The condition.action
- The action.
-
-
Method Detail
-
getCondition
public ICondition getCondition()
Get the condition.- Specified by:
getCondition
in interfaceIRule
- Returns:
- The condition.
-
getAction
public IAction getAction()
Get the action.
-
getName
public java.lang.String getName()
Get the rule name.
-
getPriorityEvaluator
public IPriorityEvaluator getPriorityEvaluator()
Get the priority.- Specified by:
getPriorityEvaluator
in interfaceIRule
- Returns:
- The priority.
-
hashCode
public int hashCode()
Compute the hash code.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- The hash code.
-
equals
public boolean equals(java.lang.Object obj)
Test for equality.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- The object.- Returns:
- True, if this object equals obj.
-
toString
public java.lang.String toString()
Create a string representation of the rule.- Overrides:
toString
in classjava.lang.Object
-
-