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 net.okocraft.box.api.model.result.item.ItemRenameResult
ItemRenameResult.DuplicateName, ItemRenameResult.ExceptionOccurred, ItemRenameResult.Success
-
Constructor Summary
ConstructorDescriptionSuccess
(@NotNull BoxCustomItem customItem, @NotNull String previousName) 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.@NotNull String
Returns the value of thepreviousName
record component.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 componentpreviousName
- the value for thepreviousName
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
-
previousName
Returns the value of thepreviousName
record component.- Returns:
- the value of the
previousName
record component
-