@Immutable @Singleton public final class LinearInterpolator extends java.lang.Object implements Interpolator
Because this class has no state, it is implemented as a singleton that is
referenced using the getInstance()
static method. The singleton
instance is thread-safe
Modifier and Type | Method and Description |
---|---|
static LinearInterpolator |
getInstance()
Gets the single
LinearInterpolator object. |
double |
interpolate(double fraction)
This method always returns the value it was given, which will cause callers
to calculate a linear interpolation between boundary values.
|
java.lang.String |
toString() |
@NonNull public static LinearInterpolator getInstance()
LinearInterpolator
object.LinearInterpolator
object.@RegionEffects(value="reads Instance") public double interpolate(double fraction)
interpolate
in interface Interpolator
fraction
- a value between 0 and 1, representing the elapsed fraction of a
time interval (either an entire animation cycle or an interval
between two KeyTimes, depending on where this Interpolator
has been set)fraction
parameter.public java.lang.String toString()
toString
in class java.lang.Object