/** * Set the selected option of this group to <code>name</code>. * * @param option the option that is selected * @throws AlreadySelectedException if an option from this group has * already been selected. */ public void setSelected(Option option) throws AlreadySelectedException { if (option == null) { // reset the option previously selected selected = null; return; } // if no option has already been selected or the // same option is being reselected then set the // selected member variable if (selected == null || selected.equals(option.getKey())) { selected = option.getKey(); } else { throw new AlreadySelectedException(this, option); } }
/** * set the selected option of this group to <code>name</code>. * @param opt the option that is selected * @throws AlreadySelectedException if an option from this group has * already been selected. */ public void setSelected(Option opt) throws AlreadySelectedException { // if no option has already been selected or the // same option is being reselected then set the // selected member variable if ((this.selected == null) || this.selected.equals(opt.getOpt())) { this.selected = opt.getOpt(); } else { throw new AlreadySelectedException("an option from this group has " + "already been selected: '" + selected + "'"); } }
/** * set the selected option of this group to <code>name</code>. * @param opt the option that is selected * @throws AlreadySelectedException if an option from this group has * already been selected. */ public void setSelected(Option opt) throws AlreadySelectedException { // if no option has already been selected or the // same option is being reselected then set the // selected member variable if ((this.selected == null) || this.selected.equals(opt.getOpt())) { this.selected = opt.getOpt(); } else { throw new AlreadySelectedException("an option from this group has " + "already been selected: '" + selected + "'"); } }
/** * Set the selected option of this group to <code>name</code>. * * @param option the option that is selected * @throws AlreadySelectedException if an option from this group has * already been selected. */ public void setSelected(Option option) throws AlreadySelectedException { // if no option has already been selected or the // same option is being reselected then set the // selected member variable if (selected == null || selected.equals(option.getOpt())) { selected = option.getOpt(); } else { throw new AlreadySelectedException(this, option); } }
/** * Set the selected option of this group to <code>name</code>. * * @param option the option that is selected * @throws AlreadySelectedException if an option from this group has * already been selected. */ public void setSelected(Option option) throws AlreadySelectedException { // if no option has already been selected or the // same option is being reselected then set the // selected member variable if (selected == null || selected.equals(option.getOpt())) { selected = option.getOpt(); } else { throw new AlreadySelectedException(this, option); } }
/** * Set the selected option of this group to <code>name</code>. * * @param option the option that is selected * @throws AlreadySelectedException if an option from this group has * already been selected. */ public void setSelected(Option option) throws AlreadySelectedException { if (option == null) { // reset the option previously selected selected = null; return; } // if no option has already been selected or the // same option is being reselected then set the // selected member variable if (selected == null || selected.equals(option.getKey())) { selected = option.getKey(); } else { throw new AlreadySelectedException(this, option); } }
public void foo(){ //here, at compile time we use the one in EvoSuite dependency, but not at runtime AlreadySelectedException e = new AlreadySelectedException(null); if(e.toString().equals("foo")){ System.out.println("Only executed if SUT version is used, and not the one in EvoSuite's dependencies"); } } }