Record Class SimulationStateRecord
java.lang.Object
java.lang.Record
gov.nasa.jpl.aerie.scheduler.server.services.SimulationStateRecord
public record SimulationStateRecord(SimulationStateRecord.Status status, Optional<gov.nasa.jpl.aerie.merlin.driver.SimulationFailure> reason)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSimulationStateRecord(SimulationStateRecord.Status status, Optional<gov.nasa.jpl.aerie.merlin.driver.SimulationFailure> reason) Creates an instance of aSimulationStateRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static SimulationStateRecordfailed(gov.nasa.jpl.aerie.merlin.driver.SimulationFailure reason) final inthashCode()Returns a hash code value for this object.static SimulationStateRecordstatic SimulationStateRecordpending()Optional<gov.nasa.jpl.aerie.merlin.driver.SimulationFailure> reason()Returns the value of thereasonrecord component.status()Returns the value of thestatusrecord component.static SimulationStateRecordsuccess()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SimulationStateRecord
public SimulationStateRecord(SimulationStateRecord.Status status, Optional<gov.nasa.jpl.aerie.merlin.driver.SimulationFailure> reason) Creates an instance of aSimulationStateRecordrecord class.- Parameters:
status- the value for thestatusrecord componentreason- the value for thereasonrecord component
-
-
Method Details
-
pending
-
incomplete
-
failed
public static SimulationStateRecord failed(gov.nasa.jpl.aerie.merlin.driver.SimulationFailure reason) -
success
-
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). -
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-