|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnu.staldal.xmltree.Node
nu.staldal.xmltree.NodeWithChildren
public abstract class NodeWithChildren
Base class for a node with children. The children are ordered.
| Field Summary |
|---|
| Fields inherited from class nu.staldal.xmltree.Node |
|---|
parent |
| Constructor Summary | |
|---|---|
|
NodeWithChildren()
Construct a node which children. |
|
NodeWithChildren(int capacity)
Construct a node which children. |
protected |
NodeWithChildren(NodeWithChildren node)
Pseudo-copy constructor, do not copy the children, but allocate room for them. |
| Method Summary | ||
|---|---|---|
void |
add(int index,
Node element)
|
|
boolean |
add(Node newChild)
|
|
boolean |
addAll(java.util.Collection<? extends Node> c)
|
|
boolean |
addAll(int index,
java.util.Collection<? extends Node> c)
|
|
void |
clear()
|
|
boolean |
contains(java.lang.Object o)
|
|
boolean |
containsAll(java.util.Collection<?> c)
|
|
Node |
get(int index)
|
|
java.util.Collection<Element> |
getChildElements()
Returns an read-only Collection of all children which are Elements. |
|
Element |
getFirstChildElement()
Shortcut method for getting the first Element children with any name. |
|
Element |
getFirstChildElement(java.lang.String name)
Shortcut method for getting the first Element child with a specified name. |
|
Element |
getFirstChildElementOrNull()
Shortcut method for getting the first Element children with any name. |
|
Element |
getFirstChildElementOrNull(java.lang.String name)
Shortcut method for getting the first Element child with a specified name. |
|
int |
indexOf(java.lang.Object o)
|
|
boolean |
isEmpty()
|
|
java.util.Iterator<Node> |
iterator()
|
|
int |
lastIndexOf(java.lang.Object o)
|
|
java.util.ListIterator<Node> |
listIterator()
|
|
java.util.ListIterator<Node> |
listIterator(int index)
|
|
Node |
remove(int index)
|
|
boolean |
remove(java.lang.Object o)
|
|
boolean |
removeAll(java.util.Collection<?> c)
|
|
boolean |
retainAll(java.util.Collection<?> c)
|
|
Node |
set(int index,
Node newChild)
|
|
int |
size()
|
|
java.util.List<Node> |
subList(int fromIndex,
int toIndex)
|
|
java.lang.Object[] |
toArray()
|
|
|
toArray(T[] a)
|
|
| Methods inherited from class nu.staldal.xmltree.Node |
|---|
getBaseURI, getColumnNumber, getInheritedAttribute, getLineNumber, getParent, getPreserveSpace, getPublicId, getSystemId, isWhitespaceNode, lookupNamespacePrefix, lookupNamespaceURI, setColumn, setLine, setPublicId, setSystemId, toSAX |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public NodeWithChildren()
public NodeWithChildren(int capacity)
capacity - the number of children this node should have, use -1 if
unknownprotected NodeWithChildren(NodeWithChildren node)
node - node to copy.| Method Detail |
|---|
public Element getFirstChildElementOrNull(java.lang.String name)
name - the qualified name of the element
null if there is no such child.
public Element getFirstChildElement(java.lang.String name)
throws org.xml.sax.SAXParseException
name - the qualified name of the element
null.
org.xml.sax.SAXParseException - if there is no such child.public Element getFirstChildElementOrNull()
null if there are no
Element children.
public Element getFirstChildElement()
throws org.xml.sax.SAXParseException
null.
org.xml.sax.SAXParseException - if there are no Element children.public java.util.Collection<Element> getChildElements()
public Node get(int index)
get in interface java.util.List<Node>public boolean add(Node newChild)
add in interface java.util.Collection<Node>add in interface java.util.List<Node>
public Node set(int index,
Node newChild)
set in interface java.util.List<Node>public boolean addAll(java.util.Collection<? extends Node> c)
addAll in interface java.util.Collection<Node>addAll in interface java.util.List<Node>public void clear()
clear in interface java.util.Collection<Node>clear in interface java.util.List<Node>public boolean contains(java.lang.Object o)
contains in interface java.util.Collection<Node>contains in interface java.util.List<Node>public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<Node>containsAll in interface java.util.List<Node>public boolean isEmpty()
isEmpty in interface java.util.Collection<Node>isEmpty in interface java.util.List<Node>public java.util.Iterator<Node> iterator()
iterator in interface java.lang.Iterable<Node>iterator in interface java.util.Collection<Node>iterator in interface java.util.List<Node>public int size()
size in interface java.util.Collection<Node>size in interface java.util.List<Node>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<Node>toArray in interface java.util.List<Node>public <T> T[] toArray(T[] a)
toArray in interface java.util.Collection<Node>toArray in interface java.util.List<Node>public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<Node>remove in interface java.util.List<Node>public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<Node>removeAll in interface java.util.List<Node>public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<Node>retainAll in interface java.util.List<Node>
public void add(int index,
Node element)
add in interface java.util.List<Node>
public boolean addAll(int index,
java.util.Collection<? extends Node> c)
addAll in interface java.util.List<Node>public int indexOf(java.lang.Object o)
indexOf in interface java.util.List<Node>public int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.List<Node>public java.util.ListIterator<Node> listIterator()
listIterator in interface java.util.List<Node>public java.util.ListIterator<Node> listIterator(int index)
listIterator in interface java.util.List<Node>public Node remove(int index)
remove in interface java.util.List<Node>
public java.util.List<Node> subList(int fromIndex,
int toIndex)
subList in interface java.util.List<Node>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||