Record Class ItemRegistrationResult.Success
java.lang.Object
java.lang.Record
net.okocraft.box.api.model.result.item.ItemRegistrationResult.Success
- Record Components:
customItem
- a registered custom item
- All Implemented Interfaces:
ItemRegistrationResult
- Enclosing interface:
ItemRegistrationResult
public static record ItemRegistrationResult.Success(@NotNull BoxCustomItem customItem)
extends Record
implements ItemRegistrationResult
A record of the
ItemRegistrationResult
that indicates success.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.okocraft.box.api.model.result.item.ItemRegistrationResult
ItemRegistrationResult.DuplicateItem, ItemRegistrationResult.DuplicateName, ItemRegistrationResult.ExceptionOccurred, ItemRegistrationResult.Success
-
Constructor Summary
ConstructorDescriptionSuccess
(@NotNull BoxCustomItem customItem) Creates an instance of aSuccess
record class. -
Method Summary
Modifier and TypeMethodDescription@NotNull BoxCustomItem
Returns the value of thecustomItem
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Success
Creates an instance of aSuccess
record class.- Parameters:
customItem
- the value for thecustomItem
record 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)
. -
customItem
Returns the value of thecustomItem
record component.- Returns:
- the value of the
customItem
record component
-