public class OrGate extends LogicGate { public OrGate(int inputnr) { super(inputnr); } public OrGate(DigitalInput... inputvals) { super(inputvals); } @Override public boolean getOutput() { boolean state = getInput(0).getValue(); for (int i = 1; i < getInputNumber(); i++) { state |= getInput(i).getValue(); } return state; } }