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
Modifier and TypeFieldDescriptionprivate final HashCache.ProviderCache
The field for thecache
record component.private final String
The field for theproviderId
record component.private final int
The field for thewrites
record component. -
Constructor Summary
ConstructorDescriptionUpdateResult
(String providerId, HashCache.ProviderCache cache, int writes) Creates an instance of aUpdateResult
record class. -
Method Summary
Modifier and TypeMethodDescriptioncache()
Returns the value of thecache
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.Returns the value of theproviderId
record component.final String
toString()
Returns a string representation of this record class.int
writes()
Returns the value of thewrites
record component.
-
Field Details
-
providerId
The field for theproviderId
record component. -
cache
The field for thecache
record component. -
writes
private final int writesThe field for thewrites
record component.
-
-
Constructor Details
-
UpdateResult
Creates an instance of aUpdateResult
record class.- Parameters:
providerId
- the value for theproviderId
record componentcache
- the value for thecache
record componentwrites
- the value for thewrites
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 '=='. -
providerId
Returns the value of theproviderId
record component.- Returns:
- the value of the
providerId
record component
-
cache
Returns the value of thecache
record component.- Returns:
- the value of the
cache
record component
-
writes
public int writes()Returns the value of thewrites
record component.- Returns:
- the value of the
writes
record component
-