Added project specific format; Default values in WireArray are now U
[Mograsim.git] / era.mi / src / era / mi / logic / components / gates / NotGate.java
index 01b2cc8..79c7f3e 100644 (file)
@@ -7,13 +7,15 @@ import java.util.List;
 import era.mi.logic.Util;\r
 import era.mi.logic.components.BasicComponent;\r
 import era.mi.logic.wires.WireArray;\r
-import era.mi.logic.wires.WireArray.WireArrayInput;\r
+import era.mi.logic.wires.WireArray.WireArrayEnd;\r
 \r
-public class NotGate extends BasicComponent {\r
+public class NotGate extends BasicComponent\r
+{\r
        private WireArray in, out;\r
-       private WireArrayInput outI;\r
+       private WireArrayEnd outI;\r
 \r
-       public NotGate(int processTime, WireArray in, WireArray out) {\r
+       public NotGate(int processTime, WireArray in, WireArray out)\r
+       {\r
                super(processTime);\r
                this.in = in;\r
                in.addObserver(this);\r
@@ -21,25 +23,30 @@ public class NotGate extends BasicComponent {
                outI = out.createInput();\r
        }\r
 \r
-       public void compute() {\r
+       public void compute()\r
+       {\r
                outI.feedSignals(Util.not(in.getValues()));\r
        }\r
 \r
-       public WireArray getIn() {\r
+       public WireArray getIn()\r
+       {\r
                return in;\r
        }\r
 \r
-       public WireArray getOut() {\r
+       public WireArray getOut()\r
+       {\r
                return out;\r
        }\r
 \r
        @Override\r
-       public List<WireArray> getAllInputs() {\r
+       public List<WireArray> getAllInputs()\r
+       {\r
                return Collections.unmodifiableList(Arrays.asList(in));\r
        }\r
 \r
        @Override\r
-       public List<WireArray> getAllOutputs() {\r
+       public List<WireArray> getAllOutputs()\r
+       {\r
                return Collections.unmodifiableList(Arrays.asList(out));\r
        }\r
 }\r