Record Class SimulationEngine.Span
java.lang.Object
java.lang.Record
gov.nasa.jpl.aerie.merlin.driver.engine.SimulationEngine.Span
- Enclosing class:
SimulationEngine
public static record SimulationEngine.Span(Optional<SpanId> parent, gov.nasa.jpl.aerie.merlin.protocol.types.Duration startOffset, Optional<gov.nasa.jpl.aerie.merlin.protocol.types.Duration> endOffset)
extends Record
The span of time over which a subtree of tasks has acted.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclose
(gov.nasa.jpl.aerie.merlin.protocol.types.Duration endOffset) Close out a span, marking it as inactive past the given time.Optional
<gov.nasa.jpl.aerie.merlin.protocol.types.Duration> duration()
Optional
<gov.nasa.jpl.aerie.merlin.protocol.types.Duration> Returns the value of theendOffset
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
parent()
Returns the value of theparent
record component.gov.nasa.jpl.aerie.merlin.protocol.types.Duration
Returns the value of thestartOffset
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Span
public Span(Optional<SpanId> parent, gov.nasa.jpl.aerie.merlin.protocol.types.Duration startOffset, Optional<gov.nasa.jpl.aerie.merlin.protocol.types.Duration> endOffset) Creates an instance of aSpan
record class.- Parameters:
parent
- the value for theparent
record componentstartOffset
- the value for thestartOffset
record componentendOffset
- the value for theendOffset
record component
-
-
Method Details
-
close
Close out a span, marking it as inactive past the given time. -
duration
-
isComplete
public boolean isComplete() -
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
parent
Returns the value of theparent
record component.- Returns:
- the value of the
parent
record component
-
startOffset
public gov.nasa.jpl.aerie.merlin.protocol.types.Duration startOffset()Returns the value of thestartOffset
record component.- Returns:
- the value of the
startOffset
record component
-
endOffset
Returns the value of theendOffset
record component.- Returns:
- the value of the
endOffset
record component
-