Record Class InventoryConfiguration
java.lang.Object
java.lang.Record
eu.cloudnetservice.modules.npc.configuration.InventoryConfiguration
public record InventoryConfiguration(int inventorySize, boolean dynamicSize, @NonNull InventoryConfiguration.ItemLayoutHolder defaultItems, @NonNull Map<String, InventoryConfiguration.ItemLayoutHolder> perGroupLayouts, @NonNull Map<Integer, ItemLayout> fixedItems)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @NonNull InventoryConfiguration.ItemLayoutHolderThe field for thedefaultItemsrecord component.private final booleanThe field for thedynamicSizerecord component.private final @NonNull Map<Integer, ItemLayout> The field for thefixedItemsrecord component.private final intThe field for theinventorySizerecord component.private final @NonNull Map<String, InventoryConfiguration.ItemLayoutHolder> The field for theperGroupLayoutsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionInventoryConfiguration(int inventorySize, boolean dynamicSize, @NonNull InventoryConfiguration.ItemLayoutHolder defaultItems, @NonNull Map<String, InventoryConfiguration.ItemLayoutHolder> perGroupLayouts, @NonNull Map<Integer, ItemLayout> fixedItems) Creates an instance of aInventoryConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder(@NonNull InventoryConfiguration configuration) Returns the value of thedefaultItemsrecord component.booleanReturns the value of thedynamicSizerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefixedItemsrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of theinventorySizerecord component.Returns the value of theperGroupLayoutsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
inventorySize
private final int inventorySizeThe field for theinventorySizerecord component. -
dynamicSize
private final boolean dynamicSizeThe field for thedynamicSizerecord component. -
defaultItems
The field for thedefaultItemsrecord component. -
perGroupLayouts
@NonNull private final @NonNull Map<String, InventoryConfiguration.ItemLayoutHolder> perGroupLayoutsThe field for theperGroupLayoutsrecord component. -
fixedItems
The field for thefixedItemsrecord component.
-
-
Constructor Details
-
InventoryConfiguration
public InventoryConfiguration(int inventorySize, boolean dynamicSize, @NonNull @NonNull InventoryConfiguration.ItemLayoutHolder defaultItems, @NonNull @NonNull Map<String, InventoryConfiguration.ItemLayoutHolder> perGroupLayouts, @NonNull @NonNull Map<Integer, ItemLayout> fixedItems) Creates an instance of aInventoryConfigurationrecord class.- Parameters:
inventorySize- the value for theinventorySizerecord componentdynamicSize- the value for thedynamicSizerecord componentdefaultItems- the value for thedefaultItemsrecord componentperGroupLayouts- the value for theperGroupLayoutsrecord componentfixedItems- the value for thefixedItemsrecord component
-
-
Method Details
-
builder
-
builder
@NonNull public static @NonNull InventoryConfiguration.Builder builder(@NonNull @NonNull InventoryConfiguration configuration) -
getHolder
@NonNull public @NonNull InventoryConfiguration.ItemLayoutHolder getHolder(String @NonNull ... groups) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
inventorySize
public int inventorySize()Returns the value of theinventorySizerecord component.- Returns:
- the value of the
inventorySizerecord component
-
dynamicSize
public boolean dynamicSize()Returns the value of thedynamicSizerecord component.- Returns:
- the value of the
dynamicSizerecord component
-
defaultItems
Returns the value of thedefaultItemsrecord component.- Returns:
- the value of the
defaultItemsrecord component
-
perGroupLayouts
Returns the value of theperGroupLayoutsrecord component.- Returns:
- the value of the
perGroupLayoutsrecord component
-
fixedItems
Returns the value of thefixedItemsrecord component.- Returns:
- the value of the
fixedItemsrecord component
-