Did some clean up
[Mograsim.git] / era.mi / src / era / mi / logic / wires / WireArray.java
index 033d1d4..ca93fcb 100644 (file)
@@ -22,7 +22,7 @@ public class WireArray
        public final int travelTime;\r
        private List<WireArrayObserver> observers = new ArrayList<WireArrayObserver>();\r
        public final int length;\r
-       private List<WireArrayEnd> inputs = new ArrayList<WireArrayEnd>();\r
+       List<WireArrayEnd> inputs = new ArrayList<WireArrayEnd>();\r
 \r
        public WireArray(int length, int travelTime)\r
        {\r
@@ -73,7 +73,7 @@ public class WireArray
                }\r
        }\r
 \r
-       private void recalculate()\r
+       void recalculate()\r
        {\r
                switch (inputs.size())\r
                {\r
@@ -223,7 +223,7 @@ public class WireArray
                return new WireArrayEnd(this);\r
        }\r
 \r
-       private void registerInput(WireArrayEnd toRegister)\r
+       void registerInput(WireArrayEnd toRegister)\r
        {\r
                inputs.add(toRegister);\r
        }\r
@@ -239,9 +239,9 @@ public class WireArray
        {\r
                public final WireArray owner;\r
                private boolean open;\r
-               private Bit[] inputValues;\r
+               Bit[] inputValues;\r
 \r
-               private WireArrayEnd(WireArray owner)\r
+               WireArrayEnd(WireArray owner)\r
                {\r
                        super();\r
                        this.owner = owner;\r
@@ -264,12 +264,11 @@ public class WireArray
                 */\r
                public void feedSignals(Bit... newValues)\r
                {\r
-                       if (newValues.length == length)\r
-                       {\r
-                               feedSignals(0, newValues);\r
-                       } else\r
+                       if (newValues.length != length)\r
                                throw new IllegalArgumentException(\r
                                                String.format("Attempted to input %d bits instead of %d bits.", newValues.length, length));\r
+                       feedSignals(0, newValues);\r
+\r
                }\r
 \r
                /**\r