Spec-Zone .ru
спецификации, руководства, описания, API
|
public final class KeyValue
extends java.lang.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(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
|
java.lang.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. |
java.lang.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 Interpolator
java.lang.NullPointerException
- if target
or interpolator
are null
public KeyValue(WritableValue<T> target, T endValue)
KeyValue
that uses Interpolator.LINEAR
.target
- the targetendValue
- the end valuejava.lang.NullPointerException
- if target
or interpolator
are null
public WritableValue<?> getTarget()
KeyValue
public java.lang.Object getEndValue()
KeyValue
public Interpolator getInterpolator()
Interpolator
to be used for calculating the key value along the
particular interval. By default, Interpolator.LINEAR
is used.public java.lang.String toString()
KeyValue
object.toString
in class java.lang.Object
KeyValue
object.public int hashCode()
KeyValue
object.hashCode
in class java.lang.Object
KeyValue
object.public boolean equals(java.lang.Object obj)
KeyValues
are considered equal, if their target
, endValue
, and interpolator
are equal.equals
in class java.lang.Object
Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to