Class CausalLink

  • All Implemented Interfaces:
    java.io.Serializable

    public class CausalLink
    extends java.lang.Object
    implements java.io.Serializable
    Represents 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
    • 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--> B
      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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Integer getCondition()
      Gets Condition p in the Causal Link A --p--> B
      java.lang.Integer getDestination()
      Gets the step B in the Causal Link A --p--> B
      java.lang.Integer getEffect()
      Gets Effect p in the Causal Link A --p--> B
      OrderingConstraint getOrderConstraint()
      Gets the ordering constraint A < B that is implicit in the Causal Link A --p--> B
      java.lang.Integer getSource()
      Gets the step A in the Causal Link A --p--> B
      void setCondition​(java.lang.Integer condition)
      Sets the condition p in the Causal Link A --p--> B
      java.lang.String toString()
      Converts the causal link to a String
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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
    • 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:
        toString in class java.lang.Object
        Returns:
        the converted String