Record Class KeyFrame
java.lang.Object
java.lang.Record
nl.colorize.util.animation.KeyFrame
- All Implemented Interfaces:
Comparable<KeyFrame>
Defines a property's value at a certain point in time, used in conjunction
with
Timeline. The key frame's time indicates its position
on the timeline, in seconds. The timeline will then use the key frame data,
interpolating between key frames when necessary.-
Constructor Summary
ConstructorsConstructorDescriptionKeyFrame(float time, float value) Creates an instance of aKeyFramerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floattime()Returns the value of thetimerecord component.toString()Returns a string representation of this record class.floatvalue()Returns the value of thevaluerecord component.
-
Constructor Details
-
KeyFrame
public KeyFrame(float time, float value) Creates an instance of aKeyFramerecord class.- Parameters:
time- the value for thetimerecord componentvalue- the value for thevaluerecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<KeyFrame>
-
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 with thecomparemethod from their corresponding wrapper classes. -
time
public float time()Returns the value of thetimerecord component.- Returns:
- the value of the
timerecord component
-
value
public float value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-