Class 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
  • 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

      public RecurrenceGoal 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:
      build in class ActivityTemplateGoal.Builder<RecurrenceGoal.Builder>
      Returns:
      a newly allocated goal object matching all specifications
    • getThis

      protected RecurrenceGoal.Builder 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:
      getThis in class Goal.Builder<RecurrenceGoal.Builder>
      Returns:
      reference to the current builder object (specifically typed)
    • fill

      protected RecurrenceGoal fill(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 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