Interface Interpolator<T>

  • Type Parameters:
    T - type of the values to interpolate
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface Interpolator<T>
    Interpolates values between two boundary values.

    This is a simpler and more flexible interface than the class Interpolator. Simpler, because it only interpolates values of one type, T. More flexible, because the values to interpolate don't have to be numbers nor implement Interpolatable.

    • Field Detail

      • LINEAR_DOUBLE

        static final Interpolator<java.lang.Double> LINEAR_DOUBLE
      • LINEAR_INTEGER

        static final Interpolator<java.lang.Integer> LINEAR_INTEGER
      • LINEAR_LONG

        static final Interpolator<java.lang.Long> LINEAR_LONG
      • LINEAR_NUMBER

        static final Interpolator<java.lang.Number> LINEAR_NUMBER
      • EASE_BOTH_DOUBLE

        static final Interpolator<java.lang.Double> EASE_BOTH_DOUBLE
      • EASE_BOTH_INTEGER

        static final Interpolator<java.lang.Integer> EASE_BOTH_INTEGER
      • EASE_BOTH_LONG

        static final Interpolator<java.lang.Long> EASE_BOTH_LONG
      • EASE_BOTH_NUMBER

        static final Interpolator<java.lang.Number> EASE_BOTH_NUMBER
      • EASE_IN_DOUBLE

        static final Interpolator<java.lang.Double> EASE_IN_DOUBLE
      • EASE_IN_INTEGER

        static final Interpolator<java.lang.Integer> EASE_IN_INTEGER
      • EASE_IN_LONG

        static final Interpolator<java.lang.Long> EASE_IN_LONG
      • EASE_IN_NUMBER

        static final Interpolator<java.lang.Number> EASE_IN_NUMBER
      • EASE_OUT_DOUBLE

        static final Interpolator<java.lang.Double> EASE_OUT_DOUBLE
      • EASE_OUT_INTEGER

        static final Interpolator<java.lang.Integer> EASE_OUT_INTEGER
      • EASE_OUT_LONG

        static final Interpolator<java.lang.Long> EASE_OUT_LONG
      • EASE_OUT_NUMBER

        static final Interpolator<java.lang.Number> EASE_OUT_NUMBER
    • Method Detail

      • interpolate

        T interpolate​(T start,
                      T end,
                      double fraction)
      • get

        static <T extends javafx.animation.Interpolatable<T>> Interpolator<T> get()