Package com.jgoodies.animation
Class AnimationFunctions.SequencedAnimationFunction<T>
- java.lang.Object
-
- com.jgoodies.animation.AnimationFunctions.SequencedAnimationFunction<T>
-
- All Implemented Interfaces:
AnimationFunction<T>
- Enclosing class:
- AnimationFunctions
private static final class AnimationFunctions.SequencedAnimationFunction<T> extends java.lang.Object implements AnimationFunction<T>
Helper class to compose an animation functions from a sequences of such functions.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<AnimationFunction<T>>
functions
-
Constructor Summary
Constructors Modifier Constructor Description private
SequencedAnimationFunction(java.util.List<AnimationFunction<T>> functions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
duration()
Returns the length of this function's valid time interval.T
valueAt(long time)
Returns the function value at a given time in the valid time interval.
-
-
-
Field Detail
-
functions
private final java.util.List<AnimationFunction<T>> functions
-
-
Constructor Detail
-
SequencedAnimationFunction
private SequencedAnimationFunction(java.util.List<AnimationFunction<T>> functions)
-
-
Method Detail
-
duration
public long duration()
Description copied from interface:AnimationFunction
Returns the length of this function's valid time interval.- Specified by:
duration
in interfaceAnimationFunction<T>
- Returns:
- the length of this function's valid time interval
-
valueAt
public T valueAt(long time)
Description copied from interface:AnimationFunction
Returns the function value at a given time in the valid time interval. The value is undefined for times outside this function's time interval. An implementation may throw an exception, if this method called with a time outside the time interval.- Specified by:
valueAt
in interfaceAnimationFunction<T>
- Parameters:
time
- the time used to determine the animation effect- Returns:
- the function value at the given time
-
-