class TransitionAnimatorCreator {

    public Collection<Animator> create(List<Transition> transitions, Map<String, Element> from, Map<String, Element> to) {
        if (transitions.isEmpty()) return Collections.EMPTY_LIST;
        List<Animator> animators = new ArrayList<>();
        for (Transition transition : transitions) {
            animators.addAll(create(transition, from.get(transition.fromId.get()), to.get(transition.toId.get())));
        }
        return animators;
    }

}