public Iterator<List> getListIterator() {
return new SimpleListIterator(this);
}
public boolean removeList(List list) {
OdfElement containerElement = getListContainerElement();
Node child = containerElement.getFirstChild();
OdfFileDom ownerDocument = (OdfFileDom) containerElement.getOwnerDocument();
Document doc = (Document) ownerDocument.getDocument();
while (child != null) {
if (child instanceof TextListElement) {
TextListElement listElement1 = (TextListElement) child;
String id1 = listElement1.getXmlIdAttribute();
TextListElement listElement2 = list.getOdfElement();
String id2 = listElement2.getXmlIdAttribute();
if ((listElement1 == listElement2) || ((id1 != null) && (id2 != null) && (id1.equals(id2)))) {
doc.removeElementLinkedResource(listElement1);
containerElement.removeChild(child);
return true;
}
}
child = child.getNextSibling();
}