public class DoubleArrayValueAnimator extends Object implements ValueAnimator<double[]>
ValueAnimator
capable of producing double arrays from
a set of potentially independent underlying ValueAnimator
s.Constructor and Description |
---|
DoubleArrayValueAnimator(ValueAnimator<Double>... animators)
Construct from an array of
ValueAnimator s |
Modifier and Type | Method and Description |
---|---|
boolean |
hasFinished()
Has the animator finished animating the value.
|
static DoubleArrayValueAnimator |
makeLinear(int duration,
double... maxs)
Construct a new DoubleArrayValueAnimator from an array of
values using
LinearDoubleValueAnimator s with the
range -max to +max and the given duration. |
static DoubleArrayValueAnimator |
makeLinear(int duration,
int count,
double start,
double finish)
Construct a new DoubleArrayValueAnimator from count
LinearDoubleValueAnimator s with the given start
and finish values, and the given duration. |
static DoubleArrayValueAnimator |
makeRandomLinear(int duration,
double... maxs)
Construct a new DoubleArrayValueAnimator from an array of
values using
RandomLinearDoubleValueAnimator s with the
range -max to +max and the given duration. |
static DoubleArrayValueAnimator |
makeRandomLinear(int duration,
int count,
double start,
double finish)
Construct a new DoubleArrayValueAnimator from count
RandomLinearDoubleValueAnimator s with the given start
and finish values, and the given duration. |
double[] |
nextValue()
Get the next value.
|
void |
reset()
Reset the animator back to its initial condition.
|
@SafeVarargs public DoubleArrayValueAnimator(ValueAnimator<Double>... animators)
ValueAnimator
sanimators
- the animatorspublic static DoubleArrayValueAnimator makeLinear(int duration, double... maxs)
LinearDoubleValueAnimator
s with the
range -max to +max and the given duration.duration
- the duration of the underlying animatorsmaxs
- max distance from 0 (+/-)DoubleArrayValueAnimator
public static DoubleArrayValueAnimator makeLinear(int duration, int count, double start, double finish)
LinearDoubleValueAnimator
s with the given start
and finish values, and the given duration.duration
- the durationcount
- the number of animatorsstart
- the starting valuefinish
- the finishing valueDoubleArrayValueAnimator
public static DoubleArrayValueAnimator makeRandomLinear(int duration, double... maxs)
RandomLinearDoubleValueAnimator
s with the
range -max to +max and the given duration.duration
- the duration of the underlying animatorsmaxs
- max distance from 0 (+/-)DoubleArrayValueAnimator
public static DoubleArrayValueAnimator makeRandomLinear(int duration, int count, double start, double finish)
RandomLinearDoubleValueAnimator
s with the given start
and finish values, and the given duration.duration
- the durationcount
- the number of animatorsstart
- the starting valuefinish
- the finishing valueDoubleArrayValueAnimator
public double[] nextValue()
ValueAnimator
nextValue
in interface ValueAnimator<double[]>
public boolean hasFinished()
ValueAnimator
hasFinished
in interface ValueAnimator<double[]>
public void reset()
ValueAnimator
reset
in interface ValueAnimator<double[]>