TrackerAnimation

A record representing an animation configuration for a Tracker.

This class defines how an animation should be applied, its priority, and the tasks to run during different lifecycle stages of the animation.

Since

2.2.0

Parameters

<T>

the type of tracker this animation applies to

name

the unique name of the animation

priority

the priority of the animation (higher values usually take precedence)

targetClass

the class type of the tracker

applyCondition

a condition to check if the animation can be played

modifierBuilder

a function that provides an AnimationModifier

removeTask

the task to run when the animation is removed

successTask

the task to run when the animation starts successfully

fallbackTask

the task to run when the animation fails to start

Constructors

Link copied to clipboard
@ApiStatus.Internal
constructor(@NotNull name: @NotNull String, priority: Int, @NotNull targetClass: @NotNull Class<T>, @NotNull applyCondition: @NotNull Predicate<in T>, @NotNull modifierBuilder: @NotNull (in T) -> AnimationModifier, @NotNull removeTask: @NotNull Consumer<in T>, @NotNull successTask: @NotNull Consumer<in T>, @NotNull fallbackTask: @NotNull Consumer<in T>)

Types

Link copied to clipboard
class Builder<T : Tracker?>
A builder class for creating instances of TrackerAnimation.

Functions

Link copied to clipboard
@NotNull
open fun builder(@NotNull name: @NotNull String): @NotNull TrackerAnimation.Builder<Tracker>
Creates a new builder for a TrackerAnimation.
Link copied to clipboard
open fun compareTo(@NonNull o: @NonNull TrackerAnimation<T>): Int
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
abstract fun toString(): String