Record Class ContainerOrHandler
java.lang.Object
java.lang.Record
net.neoforged.neoforge.transfer.item.ContainerOrHandler
public record ContainerOrHandler(@Nullable Container container, @Nullable ResourceHandler<ItemResource> itemHandler)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for thecontainerrecord component.static final ContainerOrHandlerprivate final @Nullable ResourceHandler<ItemResource> The field for theitemHandlerrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionContainerOrHandler(@Nullable Container container, @Nullable ResourceHandler<ItemResource> itemHandler) Creates an instance of aContainerOrHandlerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontainerrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisEmpty()Returns the value of theitemHandlerrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
container
-
itemHandler
The field for theitemHandlerrecord component. -
EMPTY
-
-
Constructor Details
-
ContainerOrHandler
public ContainerOrHandler(@Nullable Container container, @Nullable ResourceHandler<ItemResource> itemHandler) Creates an instance of aContainerOrHandlerrecord class.- Parameters:
container- the value for thecontainerrecord componentitemHandler- the value for theitemHandlerrecord component
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
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). -
container
-
itemHandler
Returns the value of theitemHandlerrecord component.- Returns:
- the value of the
itemHandlerrecord component
-