@Override public boolean validateOperator( final boolean showErrors, final HashSet<Operator> visited, final Object data) { if (this.succeedingOperators.size() < 2) { JOptionPane.showOptionDialog( this.panel.getVisualEditor(), "A multiinput operator must have at least two child!", "Error", JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE, null, null, null); return false; } for (final OperatorIDTuple<Operator> opIDT : this.succeedingOperators) { if (!opIDT.getOperator().validateOperator(showErrors, visited, data)) { return false; } } return true; }
@Override public boolean variableInUse(final String variable, final HashSet<Operator> visited) { for (final OperatorIDTuple<Operator> opIDT : this.succeedingOperators) if (opIDT.getOperator().variableInUse(variable, visited)) return true; return false; }