/** * Create all model {@link Animation} instances from the given * {@link AnimationModel} instances * * @param animationModels The {@link AnimationModel} instances * @return The model animations */ public static List<Animation> createModelAnimations( Iterable<? extends AnimationModel> animationModels) { Objects.requireNonNull(animationModels, "The animationModels may not be null"); List<Animation> allModelAnimations = new ArrayList<Animation>(); for (AnimationModel animationModel : animationModels) { List<Channel> channels = animationModel.getChannels(); List<Animation> modelAnimations = createModelAnimationsForChannels(channels); allModelAnimations.addAll(modelAnimations); } return allModelAnimations; }