public final class KeyValue extends Object
KeyFrame, which defines a specific point on a timeline,
can hold multiple KeyValues. KeyValue is an immutable class.
A KeyValue is defined by a target, which is an implementation of
WritableValue, an end value and an
Interpolator.
Most interpolators define the interpolation between two KeyFrames.
(The only exception are tangent-interpolators.)
The KeyValue of the second KeyFrame (in forward
direction) specifies the interpolator to be used in the interval.
Tangent-interpolators define the interpolation to the left and to the right of
a KeyFrame (see Interpolator.TANGENT).
By default, Interpolator.LINEAR is used in the interval.
Timeline,
KeyFrame,
Interpolator| Constructor and Description |
|---|
KeyValue(WritableValue<T> target,
T endValue)
Creates a
KeyValue that uses Interpolator.LINEAR. |
KeyValue(WritableValue<T> target,
T endValue,
Interpolator interpolator)
Creates a
KeyValue. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
Object |
getEndValue()
Returns the end value of this
KeyValue |
Interpolator |
getInterpolator()
Interpolator to be used for calculating the key value along the
particular interval. |
WritableValue<?> |
getTarget()
Returns the target of this
KeyValue |
int |
hashCode()
Returns a hash code for this
KeyValue object. |
String |
toString()
Returns a string representation of this
KeyValue object. |
public KeyValue(WritableValue<T> target, T endValue, Interpolator interpolator)
KeyValue.target - the targetendValue - the end valueinterpolator - the InterpolatorNullPointerException - if target or interpolator are nullpublic KeyValue(WritableValue<T> target, T endValue)
KeyValue that uses Interpolator.LINEAR.target - the targetendValue - the end valueNullPointerException - if target or interpolator are nullpublic WritableValue<?> getTarget()
KeyValuepublic Object getEndValue()
KeyValuepublic Interpolator getInterpolator()
Interpolator to be used for calculating the key value along the
particular interval. By default, Interpolator.LINEAR is used.public String toString()
KeyValue object.public int hashCode()
KeyValue object.Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.