Package fr.uga.pddl4j.problem.time
Class TemporalEffect
java.lang.Object
fr.uga.pddl4j.problem.time.TemporalEffect
- All Implemented Interfaces:
Serializable
This class implements the effect of the actions.
- Since:
- 4.0
- See Also:
FluentDescription
,NumericAssignment
, Serialized Form
-
Constructor Summary
ConstructorDescriptionCreates new time effect.TemporalEffect(Effect atStart, Effect overall, Effect atEnd)
Creates a new time effect from a specified 'at start", 'overall' and 'at end effect.TemporalEffect(TemporalEffect other)
Creates new effect from an other one. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Return if a specified object is equals to this effect.Returns the at end effect of the time effect.Returns the at start effect of the time effect.Returns the overall effect of the time effect.int
hashCode()
Returns the hash code value of this time effect.void
setAtEndEffect(Effect atEnd)
Sets the at end effect of the time effect.void
setAtStartEffect(Effect atStart)
Sets the at start effect of the time effect.void
setOverallEffect(Effect overall)
Sets the overall effect of the time effect.toString()
Returns a string representation of this time effect.
-
Constructor Details
-
TemporalEffect
public TemporalEffect()Creates new time effect. By default the effect is empty -
TemporalEffect
Creates new effect from an other one. This constructor create a deep copy of the object in parameter.- Parameters:
other
- the other one.
-
TemporalEffect
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
Returns the at start effect of the time effect.- Returns:
- the at start effect of the time effect.
-
getAtEndEffect
Returns the at end effect of the time effect.- Returns:
- the at end effect of the time effect.
-
getOverallEffect
Returns the overall effect of the time effect.- Returns:
- the overall effect of the time effect.
-
setAtStartEffect
Sets the at start effect of the time effect.- Parameters:
atStart
- the at start effect to set.
-
setAtEndEffect
Sets the at end effect of the time effect.- Parameters:
atEnd
- the at end effect to set.
-
setOverallEffect
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 classObject
- Returns:
- the hash code value of this time effect.
- See Also:
Object.hashCode()
-
equals
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 classTemporalEffect
and it has the same positive and negative timed fluent description and the same numeric assignments.- Overrides:
equals
in classObject
- 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
Returns a string representation of this time effect.
-