Record Class StorageBlockData
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.common.api.storage.StorageBlockData
public record StorageBlockData(long stored, long capacity, List<Optional<ResourceAmount>> resources)
extends Record
-
Constructor Summary
ConstructorDescriptionStorageBlockData
(long stored, long capacity, List<Optional<ResourceAmount>> resources) Creates an instance of aStorageBlockData
record class. -
Method Summary
Modifier and TypeMethodDescriptionlong
capacity()
Returns the value of thecapacity
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 theresources
record component.long
stored()
Returns the value of thestored
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
StorageBlockData
Creates an instance of aStorageBlockData
record class.- Parameters:
stored
- the value for thestored
record componentcapacity
- the value for thecapacity
record componentresources
- the value for theresources
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 '=='. -
stored
public long stored()Returns the value of thestored
record component.- Returns:
- the value of the
stored
record component
-
capacity
public long capacity()Returns the value of thecapacity
record component.- Returns:
- the value of the
capacity
record component
-
resources
Returns the value of theresources
record component.- Returns:
- the value of the
resources
record component
-