Package net.minecraft.client.multiplayer
Record Class ClientDebugSubscriber.ValueWrapper<T>
java.lang.Object
java.lang.Record
net.minecraft.client.multiplayer.ClientDebugSubscriber.ValueWrapper<T>
- Enclosing class:
ClientDebugSubscriber
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longThe field for theexpiresAfterTimerecord component.private static final longprivate final TThe field for thevaluerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionValueWrapper(T value, long expiresAfterTime) Creates an instance of aValueWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longReturns the value of theexpiresAfterTimerecord component.booleanhasExpired(long pGameTime) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Field Details
-
value
The field for thevaluerecord component. -
expiresAfterTime
private final long expiresAfterTimeThe field for theexpiresAfterTimerecord component. -
NO_EXPIRY
private static final long NO_EXPIRY- See Also:
-
-
Constructor Details
-
ValueWrapper
ValueWrapper(T value, long expiresAfterTime) Creates an instance of aValueWrapperrecord class.- Parameters:
value- the value for thevaluerecord componentexpiresAfterTime- the value for theexpiresAfterTimerecord component
-
-
Method Details
-
hasExpired
public boolean hasExpired(long pGameTime) -
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 '=='. -
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
expiresAfterTime
public long expiresAfterTime()Returns the value of theexpiresAfterTimerecord component.- Returns:
- the value of the
expiresAfterTimerecord component
-