Interface AnimationIterator<T extends Timed>
- Type Parameters:
T- the type of keyframe (must implementTimed)
- All Superinterfaces:
Iterator<T>
- All Known Implementing Classes:
AnimationIterator.HoldOnLast, AnimationIterator.Loop, AnimationIterator.PlayOnce
public sealed interface AnimationIterator<T extends Timed>
extends Iterator<T>
permits AnimationIterator.PlayOnce<T>, AnimationIterator.HoldOnLast<T>, AnimationIterator.Loop<T>
An iterator for traversing animation keyframes.
This interface supports different looping modes (play once, loop, hold on last) and allows resetting the iteration state.
- Since:
- 1.15.2
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classAnimationIterator.HoldOnLast<T extends Timed>Implementation forAnimationIterator.Type.HOLD_ON_LAST.static final classAnimationIterator.Loop<T extends Timed>Implementation forAnimationIterator.Type.LOOP.static final classAnimationIterator.PlayOnce<T extends Timed>Implementation forAnimationIterator.Type.PLAY_ONCE.static enumDefines the behavior of the animation iterator. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Resets the iterator to its initial state.@NotNull AnimationIterator.Typetype()Returns the type of this animation iterator.Methods inherited from interface Iterator
forEachRemaining, hasNext, next, remove
-
Method Details
-
clear
void clear()Resets the iterator to its initial state.- Since:
- 1.15.2
-
type
Returns the type of this animation iterator.- Returns:
- the animation type
- Since:
- 1.15.2
-