Class RecurrenceGoal.Builder
java.lang.Object
gov.nasa.jpl.aerie.scheduler.goals.Goal.Builder<RecurrenceGoal.Builder>
gov.nasa.jpl.aerie.scheduler.goals.ActivityExistentialGoal.Builder<RecurrenceGoal.Builder>
gov.nasa.jpl.aerie.scheduler.goals.ActivityTemplateGoal.Builder<RecurrenceGoal.Builder>
gov.nasa.jpl.aerie.scheduler.goals.RecurrenceGoal.Builder
- Enclosing class:
RecurrenceGoal
public static class RecurrenceGoal.Builder
extends ActivityTemplateGoal.Builder<RecurrenceGoal.Builder>
the builder can construct goals piecemeal via a series of method calls
-
Field Summary
Fields inherited from class gov.nasa.jpl.aerie.scheduler.goals.ActivityTemplateGoal.Builder
matchingActTemplate, thereExistsFields inherited from class gov.nasa.jpl.aerie.scheduler.goals.ActivityExistentialGoal.Builder
childCustodyFields inherited from class gov.nasa.jpl.aerie.scheduler.goals.Goal.Builder
ending, name, planHorizon, range, resourceConstraints, starting -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()uses all pending specifications to construct a matching new goal object this is typically the last client call after a chain of specifiers, but the builder object remains viable to be further specified and build additional goalsprotected RecurrenceGoalfill(RecurrenceGoal goal) populates the provided goal with specifiers from this builder and above typically called by any derived builder classes to fill in the specifiers managed at this builder level and aboveprotected RecurrenceGoal.BuildergetThis()returns the current builder object (but typed at the lowest level) should be implemented by the builder at the bottom of the type heirarchylastActivityHappenedAt(gov.nasa.jpl.aerie.merlin.protocol.types.Duration duration) repeatingEvery(gov.nasa.jpl.aerie.merlin.protocol.types.Duration interval) specifies the fixed interval over which the activity should repeat this interval is understood to be a minimum (ie more frequent repetition does not impede the goal's satisfaction) this specifier is required.separatedByAtLeast(gov.nasa.jpl.aerie.merlin.protocol.types.Duration duration) separatedByAtMost(gov.nasa.jpl.aerie.merlin.protocol.types.Duration duration) Methods inherited from class gov.nasa.jpl.aerie.scheduler.goals.ActivityTemplateGoal.Builder
fill, match, thereExistsOneMethods inherited from class gov.nasa.jpl.aerie.scheduler.goals.ActivityExistentialGoal.Builder
fill, ownedMethods inherited from class gov.nasa.jpl.aerie.scheduler.goals.Goal.Builder
attachStateConstraint, endingAt, fill, forAllTimeIn, named, shouldRollbackIfUnsatisfied, simulateAfter, startingAt, withinPlanHorizon
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
repeatingEvery
public RecurrenceGoal.Builder repeatingEvery(gov.nasa.jpl.aerie.merlin.protocol.types.Duration interval) specifies the fixed interval over which the activity should repeat this interval is understood to be a minimum (ie more frequent repetition does not impede the goal's satisfaction) this specifier is required. it replaces any previous specification.- Parameters:
interval- IN the duration over which a matching activity instance must exist in order to satisfy the goal- Returns:
- this builder, ready for additional specification
-
separatedByAtMost
public RecurrenceGoal.Builder separatedByAtMost(gov.nasa.jpl.aerie.merlin.protocol.types.Duration duration) -
separatedByAtLeast
public RecurrenceGoal.Builder separatedByAtLeast(gov.nasa.jpl.aerie.merlin.protocol.types.Duration duration) -
lastActivityHappenedAt
public RecurrenceGoal.Builder lastActivityHappenedAt(gov.nasa.jpl.aerie.merlin.protocol.types.Duration duration) -
build
uses all pending specifications to construct a matching new goal object this is typically the last client call after a chain of specifiers, but the builder object remains viable to be further specified and build additional goals- Overrides:
buildin classActivityTemplateGoal.Builder<RecurrenceGoal.Builder>- Returns:
- a newly allocated goal object matching all specifications
-
getThis
returns the current builder object (but typed at the lowest level) should be implemented by the builder at the bottom of the type heirarchy- Specified by:
getThisin classGoal.Builder<RecurrenceGoal.Builder>- Returns:
- reference to the current builder object (specifically typed)
-
fill
populates the provided goal with specifiers from this builder and above typically called by any derived builder classes to fill in the specifiers managed at this builder level and above- Parameters:
goal- IN/OUT a goal object to be filled with specifiers from this level of builder and above- Returns:
- the provided object, with details filled in
-