@@ -0,0 +1,1163 @@
+package edu.teco.dnd.blocks;%0A%0Aimport java.io.Serializable;%0Aimport java.util.Collection;%0Aimport java.util.Collections;%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0A%0A/**%0A * This class can be used to attach multiple OutputTargets to a single %7B@link Output%7D.%0A * %0A * @author Philipp Adolf%0A *%0A * @param %3CT%3E the type of values accepted by this OutputTarget%0A */%0Apublic class CombinedOutputTarget%3CT extends Serializable%3E implements OutputTarget%3CT%3E %7B%0A%09private final Set%3COutputTarget%3C? super T%3E%3E targets;%0A%09%0A%09public CombinedOutputTarget(final Collection%3COutputTarget%3C? super T%3E%3E targets) %7B%0A%09%09this.targets = Collections.unmodifiableSet(new HashSet%3COutputTarget%3C? super T%3E%3E(targets));%0A%09%7D%0A%09%0A%09public CombinedOutputTarget(final OutputTarget%3C? super T%3E... targets) %7B%0A%09%09final Set%3COutputTarget%3C? super T%3E%3E targetsSet = new HashSet%3COutputTarget%3C? super T%3E%3E(targets.length);%0A%09%09for (final OutputTarget%3C? super T%3E target : targets) %7B%0A%09%09%09targetsSet.add(target);%0A%09%09%7D%0A%09%09this.targets = Collections.unmodifiableSet(targetsSet);%0A%09%7D%0A%09%0A%09@Override%0A%09public synchronized void setValue(final T value) %7B%0A%09%09for (final OutputTarget%3C? super T%3E target : targets) %7B%0A%09%09%09target.setValue(value);%0A%09%09%7D%0A%09%7D%0A%7D%0A

Add CombinedOutputTarget