for (Iterator i = leftFloats.iterator(); i.hasNext();) { BoxOffset boxOffset = (BoxOffset) i.next(); if (boxOffset.getBox().equals(floater)) { i.remove(); } }  for (Iterator i = rightFloats.iterator(); i.hasNext();) { BoxOffset boxOffset = (BoxOffset) i.next(); if (boxOffset.getBox().equals(floater)) { i.remove(); } }
removeFloat(floater, getFloats(LEFT)); removeFloat(floater, getFloats(RIGHT));
    public void removeFloat(FloatedBlockBox floater) {        for (Iterator i = leftFloats.iterator(); i.hasNext();) {            BoxOffset boxOffset = (BoxOffset) i.next();            if (boxOffset.getBox().equals(floater)) {                i.remove();            }        }        for (Iterator i = rightFloats.iterator(); i.hasNext();) {            BoxOffset boxOffset = (BoxOffset) i.next();            if (boxOffset.getBox().equals(floater)) {                i.remove();            }        }    }