Record Class StorageContents
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.common.api.storage.StorageContents
@API(status=STABLE,
since="3.0.0")
public record StorageContents(StorageType type, Optional<Long> capacity, List<StorageContents.Stored> stored)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionStorageContents(StorageType type, Optional<Long> capacity, List<StorageContents.Stored> stored) Creates an instance of aStorageContentsrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncapacity()Returns the value of thecapacityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.stored()Returns the value of thestoredrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
StorageContents
public StorageContents(StorageType type, Optional<Long> capacity, List<StorageContents.Stored> stored) Creates an instance of aStorageContentsrecord class.- Parameters:
type- the value for thetyperecord componentcapacity- the value for thecapacityrecord componentstored- the value for thestoredrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
capacity
-
stored
Returns the value of thestoredrecord component.- Returns:
- the value of the
storedrecord component
-