private void gatherActions(Tween tween, List<Action> subActions) {
        if (tween instanceof Action) {
            subActions.add((Action) tween);
        } else if (tween instanceof ContainsTweens) {
            Tween[] tweens = ((ContainsTweens) tween).getTweens();
            for (Tween t : tweens) {
                gatherActions(t, subActions);
            }
        }
    }
Extracts the actions from a tween into a list.

@param tween      the tween to extract the actions from (not null).
@param subActions a collection to gather the extracted actions (not null).
jme3-core/src/main/java/com/jme3/anim/tween/action/BaseAction.java