Record Class ItemRenameResult.Success
java.lang.Object
java.lang.Record
net.okocraft.box.api.model.result.item.ItemRenameResult.Success
- Record Components:
customItem- a renamed custom itempreviousName- a previous name of item
- All Implemented Interfaces:
ItemRenameResult
- Enclosing interface:
ItemRenameResult
public static record ItemRenameResult.Success(@NotNull BoxCustomItem customItem, @NotNull String previousName)
extends Record
implements ItemRenameResult
A record of the
ItemRenameResult that indicates success.-
Nested Class Summary
Nested classes/interfaces inherited from interface ItemRenameResult
ItemRenameResult.DuplicateName, ItemRenameResult.ExceptionOccurred, ItemRenameResult.Success -
Constructor Summary
ConstructorsConstructorDescriptionSuccess(@NotNull BoxCustomItem customItem, @NotNull String previousName) Creates an instance of aSuccessrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull BoxCustomItemReturns the value of thecustomItemrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull StringReturns the value of thepreviousNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Success
Creates an instance of aSuccessrecord class.- Parameters:
customItem- the value for thecustomItemrecord componentpreviousName- the value for thepreviousNamerecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
customItem
Returns the value of thecustomItemrecord component.- Returns:
- the value of the
customItemrecord component
-
previousName
Returns the value of thepreviousNamerecord component.- Returns:
- the value of the
previousNamerecord component
-