private void removePhasesFromList(DynaValidatorForm gratuityForm, List infoPaymentPhases) {
private void removePhasesFromList(DynaValidatorForm gratuityForm, List<InfoPaymentPhase> infoPaymentPhases) {
    private void removePhasesFromList(DynaValidatorForm gratuityForm, List infoPaymentPhases) {        String[] phasesToRemove = (String[]) gratuityForm.get("removedPhases");        List objectsToRemove = new ArrayList();        List toRemoveList = Arrays.asList(phasesToRemove);        Iterator iterToRemove = toRemoveList.iterator();        while (iterToRemove.hasNext()) {            String toRemove = (String) iterToRemove.next();            objectsToRemove.add(infoPaymentPhases.get(Integer.valueOf(toRemove).intValue()));        }        infoPaymentPhases.removeAll(objectsToRemove);        gratuityForm.set("removedPhases", new String[] {});    }