Record Class ClockState
java.lang.Object
java.lang.Record
org.geysermc.mcprotocollib.protocol.data.game.level.ClockState
-
Constructor Summary
ConstructorsConstructorDescriptionClockState(long totalTicks, boolean paused) Creates an instance of aClockStaterecord class. -
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.booleanpaused()Returns the value of thepausedrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalTicksrecord component.
-
Constructor Details
-
ClockState
public ClockState(long totalTicks, boolean paused) Creates an instance of aClockStaterecord class.- Parameters:
totalTicks- the value for thetotalTicksrecord componentpaused- the value for thepausedrecord 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 with '=='. -
totalTicks
public long totalTicks()Returns the value of thetotalTicksrecord component.- Returns:
- the value of the
totalTicksrecord component
-
paused
public boolean paused()Returns the value of thepausedrecord component.- Returns:
- the value of the
pausedrecord component
-