Package dev.turboism.sdk.event.cubism
Record Class PartOpacityEvent.On
java.lang.Object
java.lang.Record
dev.turboism.sdk.event.cubism.PartOpacityEvent.On
- All Implemented Interfaces:
PartOpacityEvent,EventBus.TurboismEvent,TurboismEvent
- Enclosing interface:
- PartOpacityEvent
public static record PartOpacityEvent.On(Part part, float oldOpacity, float newOpacity)
extends Record
implements PartOpacityEvent
State published after a successful opacity write that changed the value.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.turboism.sdk.event.cubism.PartOpacityEvent
PartOpacityEvent.After, PartOpacityEvent.Before, PartOpacityEvent.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.floatReturns the value of thenewOpacityrecord component.floatReturns the value of theoldOpacityrecord 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 componentoldOpacity- the value for theoldOpacityrecord componentnewOpacity- the value for thenewOpacityrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
part
Returns the value of thepartrecord component.- Specified by:
partin interfacePartOpacityEvent- Returns:
- the value of the
partrecord component
-
oldOpacity
public float oldOpacity()Returns the value of theoldOpacityrecord component.- Returns:
- the value of the
oldOpacityrecord component
-
newOpacity
public float newOpacity()Returns the value of thenewOpacityrecord component.- Returns:
- the value of the
newOpacityrecord component
-