public class GoalSet extends Object
The goals are stored as Goal
objects in a ArrayList
.
Constructor and Description |
---|
GoalSet(Goal... goals)
Constructor of the class.
|
Modifier and Type | Method and Description |
---|---|
void |
addDefinition(Rule rule)
Adds the specified definition to the right goal or creates it if needed.
|
Goal |
getGoal(String goalName)
Gets the goal corresponding to the specified name.
|
String |
toString()
Returns the set in the form of:
"Goals set:
{
Goal.toString()
Goal.toString()
}
|
public GoalSet(Goal... goals)
goals
- an array of the goals to be stored in the set or each goal
as a parameter.public Goal getGoal(String goalName)
goalName
- the name of the goal to get.Goal
object.public void addDefinition(Rule rule)
This method should be used only while creating the GoalSet
object.
rule
- the Rule
object representing the rule to add.public String toString()
toString
in class Object
Object.toString()