/** * Create one {@link Animation} for each {@link AnimationModel.Channel}. * If there is any error or inconsistency in the given data, then a * warning will be printed and the respective animation will be * skipped. * * @param channels The {@link AnimationModel.Channel} list * @return The list of model animations */ private static List<Animation> createModelAnimationsForChannels( Iterable<? extends Channel> channels) { List<Animation> modelAnimations = new ArrayList<Animation>(); for (Channel channel : channels) { Animation modelAnimation = createModelAnimation(channel); if (modelAnimation != null) { modelAnimations.add(modelAnimation); } } return modelAnimations; }