Record Class MissionTracker.MissionEvent
java.lang.Object
java.lang.Record
com.tnsai.coordination.groups.team.MissionTracker.MissionEvent
- Enclosing class:
MissionTracker
public static record MissionTracker.MissionEvent(String teamId, MissionTracker.MissionEventType type, String taskId, String description, boolean success, TeamResult result, Instant timestamp)
extends Record
Mission event.
-
Constructor Summary
ConstructorsConstructorDescriptionMissionEvent(String teamId, MissionTracker.MissionEventType type, String taskId, String description, boolean success, TeamResult result, Instant timestamp) Creates an instance of aMissionEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic MissionTracker.MissionEventstatic MissionTracker.MissionEventReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.result()Returns the value of theresultrecord component.static MissionTracker.MissionEventbooleansuccess()Returns the value of thesuccessrecord component.static MissionTracker.MissionEventtaskCompleted(String teamId, String taskId, TeamResult result) taskId()Returns the value of thetaskIdrecord component.static MissionTracker.MissionEventtaskStarted(String teamId, String taskId, String description) teamId()Returns the value of theteamIdrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
MissionEvent
public MissionEvent(String teamId, MissionTracker.MissionEventType type, String taskId, String description, boolean success, TeamResult result, Instant timestamp) Creates an instance of aMissionEventrecord class.- Parameters:
teamId- the value for theteamIdrecord componenttype- the value for thetyperecord componenttaskId- the value for thetaskIdrecord componentdescription- the value for thedescriptionrecord componentsuccess- the value for thesuccessrecord componentresult- the value for theresultrecord componenttimestamp- the value for thetimestamprecord component
-
-
Method Details
-
started
-
completed
-
cancelled
-
taskStarted
public static MissionTracker.MissionEvent taskStarted(String teamId, String taskId, String description) -
taskCompleted
public static MissionTracker.MissionEvent taskCompleted(String teamId, String taskId, TeamResult result) -
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 '=='. -
teamId
Returns the value of theteamIdrecord component.- Returns:
- the value of the
teamIdrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
taskId
Returns the value of thetaskIdrecord component.- Returns:
- the value of the
taskIdrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
success
public boolean success()Returns the value of thesuccessrecord component.- Returns:
- the value of the
successrecord component
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-