Package FAtiMA.Core.plans
Class OrderRelation
java.lang.Object
FAtiMA.Core.plans.OrderRelation
- All Implemented Interfaces:
Serializable,Cloneable
Represents an order relation between a step and other steps in the plan
- Author:
- Joao Dias
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOrderRelation(Integer stepID) Creates a new empty OrderRelation between a step and other steps in the plan -
Method Summary
Modifier and TypeMethodDescriptionclone()Clones this OrderRelation, returning an equal copy.intCompares a given step with the main step in the Order Relation if the received step occurs before, the function returns +1.getAfter()Gets the id's of all steps that occur after the main stepGets the id's of all steps that occur before the main stepGets the ID of the main step in the order relationvoidInsertAfter(Integer stepID) Asserts that the received Step must occur after this stepvoidInsertBefore(Integer stepID) Asserts that the received Step must occur before this step
-
Constructor Details
-
OrderRelation
Creates a new empty OrderRelation between a step and other steps in the plan- Parameters:
stepID- - the ID of the main Step referenced by this OrderRelation
-
-
Method Details
-
getStepID
Gets the ID of the main step in the order relation -
getAfter
Gets the id's of all steps that occur after the main step- Returns:
- the id's stored in a arraylist
-
getBefore
Gets the id's of all steps that occur before the main step- Returns:
- the id's stored in a arraylist
-
Compare
Compares a given step with the main step in the Order Relation if the received step occurs before, the function returns +1. -1 if the received step occurs after, and 0 if no order relation is defined- Parameters:
stepID- - the ID of the step to compare
-
InsertAfter
Asserts that the received Step must occur after this step- Parameters:
stepID- - the ID of the step to insert after
-
InsertBefore
Asserts that the received Step must occur before this step- Parameters:
stepID- - the ID of the step to insert before
-
clone
Clones this OrderRelation, returning an equal copy. If this clone is changed afterwards, the original object remains the same.
-