Class TemporalEffect

java.lang.Object
fr.uga.pddl4j.problem.time.TemporalEffect
All Implemented Interfaces:
Serializable

public class TemporalEffect extends Object implements Serializable
This class implements the effect of the actions.
Since:
4.0
See Also:
FluentDescription, NumericAssignment, Serialized Form
  • Constructor Details

    • TemporalEffect

      public TemporalEffect()
      Creates new time effect. By default the effect is empty
    • TemporalEffect

      public TemporalEffect(TemporalEffect other)
      Creates new effect from an other one. This constructor create a deep copy of the object in parameter.
      Parameters:
      other - the other one.
    • TemporalEffect

      public TemporalEffect(Effect atStart, Effect overall, Effect atEnd)
      Creates a new time effect from a specified 'at start", 'overall' and 'at end effect.
      Parameters:
      atStart - the start effect.
      overall - the overall effect.
      atEnd - the atEnd effect.
  • Method Details

    • getAtStartEffect

      public Effect getAtStartEffect()
      Returns the at start effect of the time effect.
      Returns:
      the at start effect of the time effect.
    • getAtEndEffect

      public Effect getAtEndEffect()
      Returns the at end effect of the time effect.
      Returns:
      the at end effect of the time effect.
    • getOverallEffect

      public Effect getOverallEffect()
      Returns the overall effect of the time effect.
      Returns:
      the overall effect of the time effect.
    • setAtStartEffect

      public void setAtStartEffect(Effect atStart)
      Sets the at start effect of the time effect.
      Parameters:
      atStart - the at start effect to set.
    • setAtEndEffect

      public void setAtEndEffect(Effect atEnd)
      Sets the at end effect of the time effect.
      Parameters:
      atEnd - the at end effect to set.
    • setOverallEffect

      public void setOverallEffect(Effect overall)
      Sets the overall effect of the time effect.
      Parameters:
      overall - the at end effect to set.
    • hashCode

      public int hashCode()
      Returns the hash code value of this time effect.
      Overrides:
      hashCode in class Object
      Returns:
      the hash code value of this time effect.
      See Also:
      Object.hashCode()
    • equals

      public boolean equals(Object object)
      Return if a specified object is equals to this effect. The specified object is equal to the time effect if and only if the object is an instance of the class TemporalEffect and it has the same positive and negative timed fluent description and the same numeric assignments.
      Overrides:
      equals in class Object
      Parameters:
      object - the specified object to be compared.
      Returns:
      true if the specified object is equal to this time effect; false otherwise.
      See Also:
      Object.equals(java.lang.Object)
    • toString

      public String toString()
      Returns a string representation of this time effect.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this time effect.