/** * Replace the first assertion with the passed assertion * * @param id id of the old assertion * @param newAssertion */ public void replaceAssertion(String id, RTChoiceType newAssertion) { int index = 0; if (id != null && !id.isEmpty()) { for (RTChoiceType assertion : assertions) { if (assertion.getID().equals(id)) { break; } index++; } } assertions.remove(index); assertions.add(index, newAssertion); }
/** * Replace the first assertion with the passed assertion * * @param id id of the old assertion * @param newAssertion */ public void replaceAssertion(String id, RTChoiceType newAssertion) { int index = 0; if (id != null && !id.isEmpty()) { for (RTChoiceType assertion : assertions) { if (assertion.getID().equals(id)) { break; } index++; } } assertions.remove(index); assertions.add(index, newAssertion); }
/** * Replace the first assertion with the passed assertion * * @param id id of the old assertion * @param newAssertion */ public void replaceAssertion(String id, RTChoiceType newAssertion) { int index = 0; if (id != null && !id.isEmpty()) { for (RTChoiceType assertion : assertions) { if (assertion.getID().equals(id)) { break; } index++; } } assertions.remove(index); assertions.add(index, newAssertion); }
/** * Replace the first assertion with the passed assertion * @param id id of the old assertion * @param newAssertion */ public void replaceAssertion(String id, RTChoiceType newAssertion) { int index = 0; if (id != null && !id.isEmpty()) { for (RTChoiceType assertion : assertions) { if (assertion.getID().equals(id)) { break; } index++; } } assertions.remove(index); assertions.add(index, newAssertion); }