public void setPrimary(String primary) { if (primary != null) { if ("true".equals(primary)) { setPrimary(true); } else if ("false".equals(primary)) { setPrimary(false); } else { throw new UnsupportedOperationException("Primary '" + primary + "' not allowed; must be 'true' or 'false'"); } } }
public void setPrimary(String primary) { if (primary != null) { if ("true".equals(primary)) { setPrimary(true); } else if ("false".equals(primary)) { setPrimary(false); } else { throw new UnsupportedOperationException("Primary '" + primary + "' not allowed; must be 'true' or 'false'"); } } }
private void checkPrimaryOutput() { int count = 0; int pcount = 0; Port defPrimary = null; Port primary = null; for (Output output : outputs()) { if (!output.getPort().endsWith("|")) { count++; if (output.getPrimary()) { pcount++; if (primary == null) { primary = output; } } if (defPrimary == null && !output.getPrimarySet()) { defPrimary = output; } } } if (pcount > 1) { throw XProcException.staticError(30); } if (count == 1 && primary == null && defPrimary != null) { if (defPrimary.getPrimary() || !defPrimary.getPrimarySet()) { defPrimary.setPrimary(true); } } }
private void checkPrimaryOutput() { int count = 0; int pcount = 0; Port defPrimary = null; Port primary = null; for (Output output : outputs()) { if (!output.getPort().endsWith("|")) { count++; if (output.getPrimary()) { pcount++; if (primary == null) { primary = output; } } if (defPrimary == null && !output.getPrimarySet()) { defPrimary = output; } } } if (pcount > 1) { throw XProcException.staticError(30); } if (count == 1 && primary == null && defPrimary != null) { if (defPrimary.getPrimary() || !defPrimary.getPrimarySet()) { defPrimary.setPrimary(true); } } }
private void checkPrimaryInput(boolean checkParameterInput) { int count = 0; int pcount = 0; Port defPrimary = null; Port primary = null; for (Input input : inputs()) { if (!input.getPort().startsWith("|")) { count++; if (input.getParameterInput() == checkParameterInput) { if (input.getPrimary()) { pcount++; if (primary == null) { primary = input; } } if (defPrimary == null && !input.getPrimarySet()) { defPrimary = input; } } } } if (pcount > 1) { throw XProcException.staticError(30); } if (count == 1 && primary == null && defPrimary != null) { if (defPrimary.getPrimary() || !defPrimary.getPrimarySet()) { defPrimary.setPrimary(true); } } }
private void checkPrimaryInput(boolean checkParameterInput) { int count = 0; int pcount = 0; Port defPrimary = null; Port primary = null; for (Input input : inputs()) { if (!input.getPort().startsWith("|")) { count++; if (input.getParameterInput() == checkParameterInput) { if (input.getPrimary()) { pcount++; if (primary == null) { primary = input; } } if (defPrimary == null && !input.getPrimarySet()) { defPrimary = input; } } } } if (pcount > 1) { throw XProcException.staticError(30); } if (count == 1 && primary == null && defPrimary != null) { if (defPrimary.getPrimary() || !defPrimary.getPrimarySet()) { defPrimary.setPrimary(true); } } }
public void checkPrimaryIO() { checkPrimaryInput(false); checkPrimaryInput(true); checkPrimaryOutput(); int count = 0; int pcount = 0; Port primary = null; Port defPrimary = null; for (Output output : outputs()) { if (!output.getPort().startsWith("#")) { count++; defPrimary = output; if (output.getPrimary()) { pcount++; primary = output; } } } if (pcount > 1) { throw XProcException.staticError(30); } if (count == 1 && (defPrimary.getPrimary() || !defPrimary.getPrimarySet())) { defPrimary.setPrimary(true); } }
public void checkPrimaryIO() { checkPrimaryInput(false); checkPrimaryInput(true); checkPrimaryOutput(); int count = 0; int pcount = 0; Port primary = null; Port defPrimary = null; for (Output output : outputs()) { if (!output.getPort().startsWith("#")) { count++; defPrimary = output; if (output.getPrimary()) { pcount++; primary = output; } } } if (pcount > 1) { throw XProcException.staticError(30); } if (count == 1 && (defPrimary.getPrimary() || !defPrimary.getPrimarySet())) { defPrimary.setPrimary(true); } }