Record Class ProfiledReloadInstance.State
java.lang.Object
java.lang.Record
net.minecraft.server.packs.resources.ProfiledReloadInstance.State
- Enclosing class:
ProfiledReloadInstance
public static record ProfiledReloadInstance.State(String name, AtomicLong preparationNanos, AtomicLong preparationCount, AtomicLong reloadNanos, AtomicLong reloadCount)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thenamerecord component.private final AtomicLongThe field for thepreparationCountrecord component.private final AtomicLongThe field for thepreparationNanosrecord component.private final AtomicLongThe field for thereloadCountrecord component.private final AtomicLongThe field for thereloadNanosrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionState(String name, AtomicLong preparationNanos, AtomicLong preparationCount, AtomicLong reloadNanos, AtomicLong reloadCount) Creates an instance of aStaterecord 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.name()Returns the value of thenamerecord component.Returns the value of thepreparationCountrecord component.Returns the value of thepreparationNanosrecord component.Returns the value of thereloadCountrecord component.Returns the value of thereloadNanosrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
name
The field for thenamerecord component. -
preparationNanos
The field for thepreparationNanosrecord component. -
preparationCount
The field for thepreparationCountrecord component. -
reloadNanos
The field for thereloadNanosrecord component. -
reloadCount
The field for thereloadCountrecord component.
-
-
Constructor Details
-
State
public State(String name, AtomicLong preparationNanos, AtomicLong preparationCount, AtomicLong reloadNanos, AtomicLong reloadCount) Creates an instance of aStaterecord class.- Parameters:
name- the value for thenamerecord componentpreparationNanos- the value for thepreparationNanosrecord componentpreparationCount- the value for thepreparationCountrecord componentreloadNanos- the value for thereloadNanosrecord componentreloadCount- the value for thereloadCountrecord 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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
preparationNanos
Returns the value of thepreparationNanosrecord component.- Returns:
- the value of the
preparationNanosrecord component
-
preparationCount
Returns the value of thepreparationCountrecord component.- Returns:
- the value of the
preparationCountrecord component
-
reloadNanos
Returns the value of thereloadNanosrecord component.- Returns:
- the value of the
reloadNanosrecord component
-
reloadCount
Returns the value of thereloadCountrecord component.- Returns:
- the value of the
reloadCountrecord component
-