Package net.minecraft.resources
Record Class RegistryResourceAccess.InMemoryStorage.Entry
java.lang.Object
java.lang.Record
net.minecraft.resources.RegistryResourceAccess.InMemoryStorage.Entry
- Enclosing class:
- RegistryResourceAccess.InMemoryStorage
static record RegistryResourceAccess.InMemoryStorage.Entry(com.google.gson.JsonElement data, int id, com.mojang.serialization.Lifecycle lifecycle)
extends Record
-
Field Summary
-
Constructor Summary
ConstructorDescriptionEntry
(com.google.gson.JsonElement data, int id, com.mojang.serialization.Lifecycle lifecycle) Creates an instance of aEntry
record class. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gson.JsonElement
data()
Returns the value of thedata
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
id()
Returns the value of theid
record component.com.mojang.serialization.Lifecycle
Returns the value of thelifecycle
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
data
private final com.google.gson.JsonElement dataThe field for thedata
record component. -
id
private final int idThe field for theid
record component. -
lifecycle
private final com.mojang.serialization.Lifecycle lifecycleThe field for thelifecycle
record component.
-
-
Constructor Details
-
Entry
Entry(com.google.gson.JsonElement data, int id, com.mojang.serialization.Lifecycle lifecycle) Creates an instance of aEntry
record class.- Parameters:
data
- the value for thedata
record componentid
- the value for theid
record componentlifecycle
- the value for thelifecycle
record 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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
data
public com.google.gson.JsonElement data()Returns the value of thedata
record component.- Returns:
- the value of the
data
record component
-
id
public int id()Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
lifecycle
public com.mojang.serialization.Lifecycle lifecycle()Returns the value of thelifecycle
record component.- Returns:
- the value of the
lifecycle
record component
-