Did some clean up
[Mograsim.git] / era.mi / src / era / mi / logic / components / gates / NotGate.java
index 1aba6b8..f664471 100644 (file)
@@ -1,16 +1,17 @@
 package era.mi.logic.components.gates;
 
+import java.util.List;
+
 import era.mi.logic.Util;
 import era.mi.logic.components.BasicComponent;
 import era.mi.logic.wires.WireArray;
-import era.mi.logic.wires.WireArray.WireArrayInput;
+import era.mi.logic.wires.WireArray.WireArrayEnd;
 
 public class NotGate extends BasicComponent
 {
        private WireArray in, out;
-       private WireArrayInput outI;
+       private WireArrayEnd outI;
 
-       
        public NotGate(int processTime, WireArray in, WireArray out)
        {
                super(processTime);
@@ -19,7 +20,8 @@ public class NotGate extends BasicComponent
                this.out = out;
                outI = out.createInput();
        }
-       
+
+       @Override
        public void compute()
        {
                outI.feedSignals(Util.not(in.getValues()));
@@ -34,4 +36,16 @@ public class NotGate extends BasicComponent
        {
                return out;
        }
+
+       @Override
+       public List<WireArray> getAllInputs()
+       {
+               return List.of(in);
+       }
+
+       @Override
+       public List<WireArray> getAllOutputs()
+       {
+               return List.of(out);
+       }
 }