Package FAtiMA.Core.plans
Class CausalLink
- java.lang.Object
-
- FAtiMA.Core.plans.CausalLink
-
- All Implemented Interfaces:
java.io.Serializable
public class CausalLink extends java.lang.Object implements java.io.SerializableRepresents a Causal Link between two Steps A and B. The causal link A --p--> B means that A achieves the precondition P for B.- Author:
- Joao Dias
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Integerconditionprotected java.lang.Stringdescriptionprotected java.lang.Integerdestinationprotected java.lang.Integereffectprotected OrderingConstraintorderConstraintprotected java.lang.Integersource
-
Constructor Summary
Constructors Constructor Description CausalLink(java.lang.Integer source, java.lang.Integer effect, java.lang.Integer destination, java.lang.Integer condition)Creates a new Causal Link A --p--> BCausalLink(java.lang.Integer source, java.lang.Integer effect, java.lang.Integer destination, java.lang.Integer condition, java.lang.String description)Creates a new Causal Link A --p--> B
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.IntegergetCondition()Gets Condition p in the Causal Link A --p--> Bjava.lang.IntegergetDestination()Gets the step B in the Causal Link A --p--> Bjava.lang.IntegergetEffect()Gets Effect p in the Causal Link A --p--> BOrderingConstraintgetOrderConstraint()Gets the ordering constraint A < B that is implicit in the Causal Link A --p--> Bjava.lang.IntegergetSource()Gets the step A in the Causal Link A --p--> BvoidsetCondition(java.lang.Integer condition)Sets the condition p in the Causal Link A --p--> Bjava.lang.StringtoString()Converts the causal link to a String
-
-
-
Field Detail
-
source
protected java.lang.Integer source
-
destination
protected java.lang.Integer destination
-
condition
protected java.lang.Integer condition
-
effect
protected java.lang.Integer effect
-
description
protected java.lang.String description
-
orderConstraint
protected OrderingConstraint orderConstraint
-
-
Constructor Detail
-
CausalLink
public CausalLink(java.lang.Integer source, java.lang.Integer effect, java.lang.Integer destination, java.lang.Integer condition, java.lang.String description)Creates a new Causal Link A --p--> B- Parameters:
source- - the ID of the Step that provides the effect (ID of Step A)effect- - the ID of the source's effect that establishes the link (ID of p in A)destination- - the ID of the Step that needs the effect (ID of Step B)condition- - the ID of the destination's precondition that is established by the link (ID of p in B)description- - a string that displays the condition p, usefull for output purpouses
-
CausalLink
public CausalLink(java.lang.Integer source, java.lang.Integer effect, java.lang.Integer destination, java.lang.Integer condition)Creates a new Causal Link A --p--> B- Parameters:
source- - the ID of the Step that provides the effect (ID of Step A)effect- - the ID of the source's effect that establishes the link (ID of p in A)destination- - the ID of the Step that needs the effect (ID of Step B)condition- - the ID of the destination's precondition that is established by the link (ID of p in B)
-
-
Method Detail
-
getSource
public java.lang.Integer getSource()
Gets the step A in the Causal Link A --p--> B- Returns:
- the ID of the Step A in the plan
-
getEffect
public java.lang.Integer getEffect()
Gets Effect p in the Causal Link A --p--> B- Returns:
- The ID of Effect p in step A
-
getDestination
public java.lang.Integer getDestination()
Gets the step B in the Causal Link A --p--> B- Returns:
- the ID of the Step B in the plan
-
getCondition
public java.lang.Integer getCondition()
Gets Condition p in the Causal Link A --p--> B- Returns:
- The ID of condition p in step B
-
setCondition
public void setCondition(java.lang.Integer condition)
Sets the condition p in the Causal Link A --p--> B- Parameters:
condition- - The ID of condition p in step B
-
getOrderConstraint
public OrderingConstraint getOrderConstraint()
Gets the ordering constraint A < B that is implicit in the Causal Link A --p--> B- Returns:
- the OrderingConstraint A < B
-
toString
public java.lang.String toString()
Converts the causal link to a String- Overrides:
toStringin classjava.lang.Object- Returns:
- the converted String
-
-