Package dev.turboism.sdk.cubism.event
Record Class PartNameEvent.On
java.lang.Object
java.lang.Record
dev.turboism.sdk.cubism.event.PartNameEvent.On
- All Implemented Interfaces:
PartNameEvent,EventBus.TurboismEvent,TurboismEvent
- Enclosing interface:
- PartNameEvent
public static record PartNameEvent.On(Part part, String oldName, String newName)
extends Record
implements PartNameEvent
State published after a successful rename that changed the name.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.turboism.sdk.cubism.event.PartNameEvent
PartNameEvent.After, PartNameEvent.Before, PartNameEvent.On -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.newName()Returns the value of thenewNamerecord component.oldName()Returns the value of theoldNamerecord component.part()Returns the value of thepartrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
On
Creates an instance of aOnrecord class.- Parameters:
part- the value for thepartrecord componentoldName- the value for theoldNamerecord componentnewName- the value for thenewNamerecord 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). -
part
Returns the value of thepartrecord component.- Specified by:
partin interfacePartNameEvent- Returns:
- the value of the
partrecord component
-
oldName
Returns the value of theoldNamerecord component.- Returns:
- the value of the
oldNamerecord component
-
newName
Returns the value of thenewNamerecord component.- Returns:
- the value of the
newNamerecord component
-