Package net.minecraft.data
Record Class HashCache.UpdateResult
java.lang.Object
java.lang.Record
net.minecraft.data.HashCache.UpdateResult
- Enclosing class:
HashCache
public static record HashCache.UpdateResult(String providerId, HashCache.ProviderCache cache, int writes)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HashCache.ProviderCacheThe field for thecacherecord component.private final StringThe field for theproviderIdrecord component.private final intThe field for thewritesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionUpdateResult(String providerId, HashCache.ProviderCache cache, int writes) Creates an instance of aUpdateResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncache()Returns the value of thecacherecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theproviderIdrecord component.final StringtoString()Returns a string representation of this record class.intwrites()Returns the value of thewritesrecord component.
-
Field Details
-
providerId
The field for theproviderIdrecord component. -
cache
The field for thecacherecord component. -
writes
private final int writesThe field for thewritesrecord component.
-
-
Constructor Details
-
UpdateResult
Creates an instance of aUpdateResultrecord class.- Parameters:
providerId- the value for theproviderIdrecord componentcache- the value for thecacherecord componentwrites- the value for thewritesrecord 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 '=='. -
providerId
Returns the value of theproviderIdrecord component.- Returns:
- the value of the
providerIdrecord component
-
cache
Returns the value of thecacherecord component.- Returns:
- the value of the
cacherecord component
-
writes
public int writes()Returns the value of thewritesrecord component.- Returns:
- the value of the
writesrecord component
-