EasingFunction.Steps


public final class EasingFunction.Steps extends EasingFunction


Parameters for a custom step easing function.

A step function is defined by the number of equal-sized steps into which the [0, 1) interval of input-x is split and the behavior at the extremes. When x < 0, the output will always be

  1. When x >= 1, the output will always be 1. The output of the first and last steps is governed by the StepPosition.

The behavior and naming follows the CSS steps() specification at CSS Easing Functions

Summary

Public constructors

Steps(int stepCount, @NonNull EasingFunction.StepPosition stepPosition)

Creates a new Steps easing function.

Public methods

boolean
equals(Object other)
final int

The number of steps.

final @NonNull EasingFunction.StepPosition

The behavior of the first and last steps.

int
@NonNull String

Public constructors

Steps

Added in 1.1.0-alpha03
public Steps(int stepCount, @NonNull EasingFunction.StepPosition stepPosition)

Creates a new Steps easing function.

Parameters
int stepCount

The number of steps. Must always be greater than 0, and must be greater than 1 if stepPosition is StepPosition.JUMP_NONE.

@NonNull EasingFunction.StepPosition stepPosition

The behavior of the first and last steps.

Public methods

equals

public boolean equals(Object other)

getStepCount

Added in 1.1.0-alpha03
public final int getStepCount()

The number of steps. Must always be greater than 0, and must be greater than 1 if stepPosition is StepPosition.JUMP_NONE.

getStepPosition

Added in 1.1.0-alpha03
public final @NonNull EasingFunction.StepPosition getStepPosition()

The behavior of the first and last steps.

hashCode

public int hashCode()

toString

public @NonNull String toString()