Completely changed the structure and switched to Eclipse Plugin.
[Mograsim.git] / net.mograsim.logic.core / src / net / mograsim / logic / core / components / Mux.java
index bbb10f5..47fe164 100644 (file)
@@ -41,11 +41,11 @@ public class Mux extends BasicComponent
                {
                        if (inputs[i].length() != outputSize)
                                throw new IllegalArgumentException("All MUX wire arrays must be of uniform length!");
-                       inputs[i].addObserver(this);
+                       inputs[i].registerObserver(this);
                }
 
                this.select = select;
-               select.addObserver(this);
+               select.registerObserver(this);
 
                int maxInputs = 1 << select.length();
                if (this.inputs.length > maxInputs)
@@ -82,7 +82,7 @@ public class Mux extends BasicComponent
        @Override
        public List<ReadEnd> getAllInputs()
        {
-               ArrayList<ReadEnd> wires = new ArrayList<ReadEnd>(Arrays.asList(inputs));
+               ArrayList<ReadEnd> wires = new ArrayList<>(Arrays.asList(inputs));
                wires.add(select);
                return Collections.unmodifiableList(wires);
        }