Reformatted everything. Eclipse built-in Linewrapping/Comments 140 chars
[Mograsim.git] / era.mi / src / era / mi / logic / components / gates / NotGate.java
index 1aba6b8..01b2cc8 100644 (file)
@@ -1,37 +1,45 @@
-package era.mi.logic.components.gates;
-
-import era.mi.logic.Util;
-import era.mi.logic.components.BasicComponent;
-import era.mi.logic.wires.WireArray;
-import era.mi.logic.wires.WireArray.WireArrayInput;
-
-public class NotGate extends BasicComponent
-{
-       private WireArray in, out;
-       private WireArrayInput outI;
-
-       
-       public NotGate(int processTime, WireArray in, WireArray out)
-       {
-               super(processTime);
-               this.in = in;
-               in.addObserver(this);
-               this.out = out;
-               outI = out.createInput();
-       }
-       
-       public void compute()
-       {
-               outI.feedSignals(Util.not(in.getValues()));
-       }
-
-       public WireArray getIn()
-       {
-               return in;
-       }
-
-       public WireArray getOut()
-       {
-               return out;
-       }
-}
+package era.mi.logic.components.gates;\r
+\r
+import java.util.Arrays;\r
+import java.util.Collections;\r
+import java.util.List;\r
+\r
+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
+\r
+public class NotGate extends BasicComponent {\r
+       private WireArray in, out;\r
+       private WireArrayInput outI;\r
+\r
+       public NotGate(int processTime, WireArray in, WireArray out) {\r
+               super(processTime);\r
+               this.in = in;\r
+               in.addObserver(this);\r
+               this.out = out;\r
+               outI = out.createInput();\r
+       }\r
+\r
+       public void compute() {\r
+               outI.feedSignals(Util.not(in.getValues()));\r
+       }\r
+\r
+       public WireArray getIn() {\r
+               return in;\r
+       }\r
+\r
+       public WireArray getOut() {\r
+               return out;\r
+       }\r
+\r
+       @Override\r
+       public List<WireArray> getAllInputs() {\r
+               return Collections.unmodifiableList(Arrays.asList(in));\r
+       }\r
+\r
+       @Override\r
+       public List<WireArray> getAllOutputs() {\r
+               return Collections.unmodifiableList(Arrays.asList(out));\r
+       }\r
+}\r