Record Class VariableClock

java.lang.Object
java.lang.Record
gov.nasa.jpl.aerie.contrib.streamline.modeling.clocks.VariableClock
All Implemented Interfaces:
Dynamics<gov.nasa.jpl.aerie.merlin.protocol.types.Duration,VariableClock>

public record VariableClock(gov.nasa.jpl.aerie.merlin.protocol.types.Duration extract, int multiplier) extends Record implements Dynamics<gov.nasa.jpl.aerie.merlin.protocol.types.Duration,VariableClock>
  • Constructor Details

    • VariableClock

      public VariableClock(gov.nasa.jpl.aerie.merlin.protocol.types.Duration extract, int multiplier)
      Creates an instance of a VariableClock record class.
      Parameters:
      extract - the value for the extract record component
      multiplier - the value for the multiplier record component
  • Method Details

    • step

      public VariableClock step(gov.nasa.jpl.aerie.merlin.protocol.types.Duration t)
      Description copied from interface: Dynamics
      Evolve for the given time.
      Specified by:
      step in interface Dynamics<gov.nasa.jpl.aerie.merlin.protocol.types.Duration,VariableClock>
    • runningStopwatch

      public static VariableClock runningStopwatch()
    • runningStopwatch

      public static VariableClock runningStopwatch(gov.nasa.jpl.aerie.merlin.protocol.types.Duration time)
    • pausedStopwatch

      public static VariableClock pausedStopwatch()
    • pausedStopwatch

      public static VariableClock pausedStopwatch(gov.nasa.jpl.aerie.merlin.protocol.types.Duration time)
    • runningTimer

      public static VariableClock runningTimer(gov.nasa.jpl.aerie.merlin.protocol.types.Duration timeRemaining)
    • pausedTimer

      public static VariableClock pausedTimer(gov.nasa.jpl.aerie.merlin.protocol.types.Duration timeRemaining)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • extract

      public gov.nasa.jpl.aerie.merlin.protocol.types.Duration extract()
      Returns the value of the extract record component.
      Specified by:
      extract in interface Dynamics<gov.nasa.jpl.aerie.merlin.protocol.types.Duration,VariableClock>
      Returns:
      the value of the extract record component
    • multiplier

      public int multiplier()
      Returns the value of the multiplier record component.
      Returns:
      the value of the multiplier record component