Record Class HashedStack
java.lang.Object
java.lang.Record
org.geysermc.mcprotocollib.protocol.data.game.item.HashedStack
public record HashedStack(int id, int count, Map<DataComponentType<?>, Integer> addedComponents, Set<DataComponentType<?>> removedComponents)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionHashedStack(int id, int count, Map<DataComponentType<?>, Integer> addedComponents, Set<DataComponentType<?>> removedComponents) Creates an instance of aHashedStackrecord class. -
Method Summary
Modifier and TypeMethodDescriptionMap<DataComponentType<?>, Integer> Returns the value of theaddedComponentsrecord component.intcount()Returns the value of thecountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.Set<DataComponentType<?>> Returns the value of theremovedComponentsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HashedStack
public HashedStack(int id, int count, Map<DataComponentType<?>, Integer> addedComponents, Set<DataComponentType<?>> removedComponents) Creates an instance of aHashedStackrecord class.- Parameters:
id- the value for theidrecord componentcount- the value for thecountrecord componentaddedComponents- the value for theaddedComponentsrecord componentremovedComponents- the value for theremovedComponentsrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
count
public int count()Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-
addedComponents
Returns the value of theaddedComponentsrecord component.- Returns:
- the value of the
addedComponentsrecord component
-
removedComponents
Returns the value of theremovedComponentsrecord component.- Returns:
- the value of the
removedComponentsrecord component
-