Record Class IdentifiedInventory
java.lang.Object
java.lang.Record
com.simibubi.create.content.logistics.packager.IdentifiedInventory
public record IdentifiedInventory(@Nullable InventoryIdentifier identifier, net.neoforged.neoforge.items.IItemHandler handler)
extends Record
An item inventory, possibly with an associated InventoryIdentifier.
-
Constructor Summary
ConstructorsConstructorDescriptionIdentifiedInventory(@Nullable InventoryIdentifier identifier, net.neoforged.neoforge.items.IItemHandler handler) Creates an instance of aIdentifiedInventoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.neoforged.neoforge.items.IItemHandlerhandler()Returns the value of thehandlerrecord component.final inthashCode()Returns a hash code value for this object.@Nullable InventoryIdentifierReturns the value of theidentifierrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
IdentifiedInventory
public IdentifiedInventory(@Nullable @Nullable InventoryIdentifier identifier, net.neoforged.neoforge.items.IItemHandler handler) Creates an instance of aIdentifiedInventoryrecord class.- Parameters:
identifier- the value for theidentifierrecord componenthandler- the value for thehandlerrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
identifier
Returns the value of theidentifierrecord component.- Returns:
- the value of the
identifierrecord component
-
handler
public net.neoforged.neoforge.items.IItemHandler handler()Returns the value of thehandlerrecord component.- Returns:
- the value of the
handlerrecord component
-