T
- Type produce by animatorpublic class ForwardBackwardLoopingValueAnimator<T> extends Object implements ReversableValueAnimator<T>
ReversableValueAnimator
that can wrap another
ReversableValueAnimator
to produce back and forth
looping behavior.Constructor and Description |
---|
ForwardBackwardLoopingValueAnimator(ReversableValueAnimator<T> animator)
Construct around the given
ReversableValueAnimator to
provide forward/backward looping behavior. |
Modifier and Type | Method and Description |
---|---|
boolean |
hasFinished()
Has the animator finished animating the value.
|
static <T> ForwardBackwardLoopingValueAnimator<T> |
loop(ReversableValueAnimator<T> animator)
Construct a new
ForwardBackwardLoopingValueAnimator from a ReversableValueAnimator . |
T |
nextValue()
Get the next value.
|
void |
reset()
Reset the animator back to its initial condition.
|
ReversableValueAnimator<T> |
reverseAnimator()
Reverse the animator and return it, or make a new animator
with the same state as this animator, but reversed direction.
|
public ForwardBackwardLoopingValueAnimator(ReversableValueAnimator<T> animator)
ReversableValueAnimator
to
provide forward/backward looping behavior.animator
- animator to looppublic T nextValue()
ValueAnimator
nextValue
in interface ValueAnimator<T>
public boolean hasFinished()
ValueAnimator
hasFinished
in interface ValueAnimator<T>
public void reset()
ValueAnimator
reset
in interface ValueAnimator<T>
public ReversableValueAnimator<T> reverseAnimator()
ReversableValueAnimator
reverseAnimator
in interface ReversableValueAnimator<T>
public static <T> ForwardBackwardLoopingValueAnimator<T> loop(ReversableValueAnimator<T> animator)
ForwardBackwardLoopingValueAnimator
from a ReversableValueAnimator
.T
- Type produce by animatoranimator
- animator to loopForwardBackwardLoopingValueAnimator