Record Class ClientDisconnectEvent
java.lang.Object
java.lang.Record
com.zenith.event.client.ClientDisconnectEvent
-
Constructor Summary
ConstructorsConstructorDescriptionClientDisconnectEvent(String reason) ClientDisconnectEvent(String reason, boolean manualDisconnect, Duration onlineDuration, Duration onlineDurationWithQueueSkip, boolean wasInQueue, int queuePosition) Creates an instance of aClientDisconnectEventrecord class.ClientDisconnectEvent(String reason, Duration onlineDuration, Duration onlineDurationWithQueueSkip, boolean wasInQueue, int queuePosition) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of themanualDisconnectrecord component.Returns the value of theonlineDurationrecord component.Returns the value of theonlineDurationWithQueueSkiprecord component.intReturns the value of thequeuePositionrecord component.reason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of thewasInQueuerecord component.
-
Constructor Details
-
ClientDisconnectEvent
-
ClientDisconnectEvent
-
ClientDisconnectEvent
public ClientDisconnectEvent(String reason, boolean manualDisconnect, Duration onlineDuration, Duration onlineDurationWithQueueSkip, boolean wasInQueue, int queuePosition) Creates an instance of aClientDisconnectEventrecord class.- Parameters:
reason- the value for thereasonrecord componentmanualDisconnect- the value for themanualDisconnectrecord componentonlineDuration- the value for theonlineDurationrecord componentonlineDurationWithQueueSkip- the value for theonlineDurationWithQueueSkiprecord componentwasInQueue- the value for thewasInQueuerecord componentqueuePosition- the value for thequeuePositionrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
manualDisconnect
public boolean manualDisconnect()Returns the value of themanualDisconnectrecord component.- Returns:
- the value of the
manualDisconnectrecord component
-
onlineDuration
Returns the value of theonlineDurationrecord component.- Returns:
- the value of the
onlineDurationrecord component
-
onlineDurationWithQueueSkip
Returns the value of theonlineDurationWithQueueSkiprecord component.- Returns:
- the value of the
onlineDurationWithQueueSkiprecord component
-
wasInQueue
public boolean wasInQueue()Returns the value of thewasInQueuerecord component.- Returns:
- the value of the
wasInQueuerecord component
-
queuePosition
public int queuePosition()Returns the value of thequeuePositionrecord component.- Returns:
- the value of the
queuePositionrecord component
-