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 Summary
ConstructorsConstructorDescriptionVariableClock(gov.nasa.jpl.aerie.merlin.protocol.types.Duration extract, int multiplier) Creates an instance of aVariableClockrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.gov.nasa.jpl.aerie.merlin.protocol.types.Durationextract()Returns the value of theextractrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of themultiplierrecord component.static VariableClockstatic VariableClockpausedStopwatch(gov.nasa.jpl.aerie.merlin.protocol.types.Duration time) static VariableClockpausedTimer(gov.nasa.jpl.aerie.merlin.protocol.types.Duration timeRemaining) static VariableClockstatic VariableClockrunningStopwatch(gov.nasa.jpl.aerie.merlin.protocol.types.Duration time) static VariableClockrunningTimer(gov.nasa.jpl.aerie.merlin.protocol.types.Duration timeRemaining) step(gov.nasa.jpl.aerie.merlin.protocol.types.Duration t) Evolve for the given time.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
VariableClock
public VariableClock(gov.nasa.jpl.aerie.merlin.protocol.types.Duration extract, int multiplier) Creates an instance of aVariableClockrecord class.- Parameters:
extract- the value for theextractrecord componentmultiplier- the value for themultiplierrecord component
-
-
Method Details
-
step
Description copied from interface:DynamicsEvolve for the given time.- Specified by:
stepin interfaceDynamics<gov.nasa.jpl.aerie.merlin.protocol.types.Duration,VariableClock>
-
runningStopwatch
-
runningStopwatch
public static VariableClock runningStopwatch(gov.nasa.jpl.aerie.merlin.protocol.types.Duration time) -
pausedStopwatch
-
pausedStopwatch
-
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
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
extract
public gov.nasa.jpl.aerie.merlin.protocol.types.Duration extract()Returns the value of theextractrecord component.- Specified by:
extractin interfaceDynamics<gov.nasa.jpl.aerie.merlin.protocol.types.Duration,VariableClock> - Returns:
- the value of the
extractrecord component
-
multiplier
public int multiplier()Returns the value of themultiplierrecord component.- Returns:
- the value of the
multiplierrecord component
-