Class 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.
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 interface AnimationFunction<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 interface AnimationFunction<T>
        Parameters:
        time - the time used to determine the animation effect
        Returns:
        the function value at the given time