Package dev.tripswitch.admin
Record Class Event
java.lang.Object
java.lang.Record
dev.tripswitch.admin.Event
public record Event(String id, String projectId, String breakerId, String fromState, String toState, String reason, Instant timestamp)
extends Record
A breaker state transition event.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebreakerIdrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefromStaterecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theprojectIdrecord component.reason()Returns the value of thereasonrecord component.Returns the value of thetimestamprecord component.toState()Returns the value of thetoStaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Event
public Event(String id, String projectId, String breakerId, String fromState, String toState, String reason, Instant timestamp) Creates an instance of aEventrecord class.- Parameters:
id- the value for theidrecord componentprojectId- the value for theprojectIdrecord componentbreakerId- the value for thebreakerIdrecord componentfromState- the value for thefromStaterecord componenttoState- the value for thetoStaterecord componentreason- the value for thereasonrecord componenttimestamp- the value for thetimestamprecord component
-
-
Method Details
-
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
projectId
Returns the value of theprojectIdrecord component.- Returns:
- the value of the
projectIdrecord component
-
breakerId
Returns the value of thebreakerIdrecord component.- Returns:
- the value of the
breakerIdrecord component
-
fromState
Returns the value of thefromStaterecord component.- Returns:
- the value of the
fromStaterecord component
-
toState
Returns the value of thetoStaterecord component.- Returns:
- the value of the
toStaterecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-