kyrie / com.github.alexjlockwood.kyrie / Animation / ValueTransformer

ValueTransformer

interface ValueTransformer<T, V>

Interface that can transform type T to another type V. This is necessary when the original value type of an animation is different than the desired value type.

Parameters

T - The animation's original value type.

V - The animation's transformed value type.

Functions

transform

abstract fun transform(value: T): V

Transforms a value from one type to another.

Inheritors

BidirectionalValueTransformer

interface BidirectionalValueTransformer<T, V> : Animation.ValueTransformer<T, V>

Interface that can transform type T to another type V and back again. This is necessary when the value types of an animation are different from the property type. This interface is only needed when working with an Animation with no explicitly set start value and that has been transformed using transform.