addinput method

This commit is contained in:
lukas-heiligenbrunner 2020-04-13 12:34:38 +02:00
parent ed29c393e0
commit e27d44a388

View File

@ -1,5 +1,4 @@
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
public abstract class LogicGate { public abstract class LogicGate {
private final ArrayList<DigitalInput> inputs = new ArrayList<>(); private final ArrayList<DigitalInput> inputs = new ArrayList<>();
@ -31,4 +30,8 @@ public abstract class LogicGate {
public int getInputNumber() { public int getInputNumber() {
return inputs.size(); return inputs.size();
} }
public void addInput(DigitalInput in){
inputs.add(in);
}
} }