Record Class NBufferBundle.Grid.TrackedBuffer
java.lang.Object
java.lang.Record
com.hypixel.hytale.builtin.hytalegenerator.newsystem.bufferbundle.NBufferBundle.Grid.TrackedBuffer
- All Implemented Interfaces:
MemInstrument
- Enclosing class:
NBufferBundle.Grid
public static record NBufferBundle.Grid.TrackedBuffer(@Nonnull NBufferBundle.Tracker tracker, @Nonnull NBuffer buffer)
extends Record
implements MemInstrument
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.hypixel.hytale.builtin.hytalegenerator.newsystem.performanceinstruments.MemInstrument
MemInstrument.Report -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final NBufferThe field for thebufferrecord component.private final NBufferBundle.TrackerThe field for thetrackerrecord component.Fields inherited from interface com.hypixel.hytale.builtin.hytalegenerator.newsystem.performanceinstruments.MemInstrument
ARRAY_HEADER_SIZE, ARRAYLIST_OBJECT_SIZE, BOOLEAN_SIZE, BYTES_IN_MEGABYTES, CLASS_OBJECT_SIZE, DOUBLE_SIZE, HASHMAP_ENTRY_SIZE, INT_SIZE, OBJECT_HEADER_SIZE, OBJECT_REFERENCE_SIZE, VECTOR3D_SIZE, VECTOR3I_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionTrackedBuffer(NBufferBundle.Tracker tracker, NBuffer buffer) Creates an instance of aTrackedBufferrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuffer()Returns the value of thebufferrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.tracker()Returns the value of thetrackerrecord component.
-
Field Details
-
tracker
The field for thetrackerrecord component. -
buffer
The field for thebufferrecord component.
-
-
Constructor Details
-
TrackedBuffer
Creates an instance of aTrackedBufferrecord class.- Parameters:
tracker- the value for thetrackerrecord componentbuffer- the value for thebufferrecord component
-
-
Method Details
-
getMemoryUsage
- Specified by:
getMemoryUsagein interfaceMemInstrument
-
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). -
tracker
Returns the value of thetrackerrecord component.- Returns:
- the value of the
trackerrecord component
-
buffer
Returns the value of thebufferrecord component.- Returns:
- the value of the
bufferrecord component
-