public class ElementList extends LinkedList<Element>
modCount| Constructor and Description |
|---|
ElementList(Element element)
Creates a list with all direct child element of the given element.
|
ElementList(Element element,
String childName)
Creates a list with all direct child element with a specific local name of the given element.
|
| Modifier and Type | Method and Description |
|---|---|
Element |
getFirstChildElement()
Gets the first child of this element.
|
Element |
getUniqueChildElement()
Gets the unique child of this list.
|
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, toArray, toArrayiteratorequals, hashCode, listIterator, removeRange, subListcontainsAll, isEmpty, removeAll, retainAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subListpublic ElementList(Element element)
element - the parent element, cannot be null.public ElementList(Element element, String childName)
element - the parent element, cannot be null.childName - the local name of the direct child elements that should be added to the list, cannot be null.public Element getUniqueChildElement() throws ParseException
null.ParseException - if no child with the specified name was found,
or if more than one child with the specified name was found.public Element getFirstChildElement()
null if no element is found.See http://www.xins.org/.