facets.util.datatree
Class NodeList
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<TypedNode>
facets.util.datatree.NodeList
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<TypedNode>, java.util.Collection<TypedNode>, java.util.List<TypedNode>, java.util.RandomAccess
public final class NodeList
- extends java.util.ArrayList<TypedNode>
List
wrapping a DataNode
and its TypedNode.children()
.
- See Also:
- Serialized Form
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary |
NodeList(TypedNode parent,
boolean autoUpdate)
Unique constructor. |
Methods inherited from class java.util.ArrayList |
addAll, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, removeRange, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
containsAll, retainAll, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
containsAll, equals, hashCode, iterator, listIterator, listIterator, retainAll, subList |
parent
public final DataNode parent
- The node whose children the
NodeList
is manipulating.
NodeList
public NodeList(TypedNode parent,
boolean autoUpdate)
- Unique constructor.
- Parameters:
parent
- must be a DataNode
whose children the NodeList
will
manipulateautoUpdate
- should each operation of the NodeList
be reflected immediately in parent
?
updateParent
public void updateParent()
- Update
parent
with the contents of the NodeList
.
Called internally on each operation unless false
was passed
to NodeList(TypedNode, boolean)
, in which case client code
must call as appropriate.
add
public boolean add(TypedNode n)
- Specified by:
add
in interface java.util.Collection<TypedNode>
- Specified by:
add
in interface java.util.List<TypedNode>
- Overrides:
add
in class java.util.ArrayList<TypedNode>
set
public TypedNode set(int at,
TypedNode n)
- Specified by:
set
in interface java.util.List<TypedNode>
- Overrides:
set
in class java.util.ArrayList<TypedNode>
add
public void add(int at,
TypedNode n)
- Specified by:
add
in interface java.util.List<TypedNode>
- Overrides:
add
in class java.util.ArrayList<TypedNode>
addAll
public boolean addAll(java.util.Collection<? extends TypedNode> c)
- Specified by:
addAll
in interface java.util.Collection<TypedNode>
- Specified by:
addAll
in interface java.util.List<TypedNode>
- Overrides:
addAll
in class java.util.ArrayList<TypedNode>
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove
in interface java.util.Collection<TypedNode>
- Specified by:
remove
in interface java.util.List<TypedNode>
- Overrides:
remove
in class java.util.ArrayList<TypedNode>
remove
public TypedNode remove(int at)
- Specified by:
remove
in interface java.util.List<TypedNode>
- Overrides:
remove
in class java.util.ArrayList<TypedNode>
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAll
in interface java.util.Collection<TypedNode>
- Specified by:
removeAll
in interface java.util.List<TypedNode>
- Overrides:
removeAll
in class java.util.AbstractCollection<TypedNode>
clear
public void clear()
- Specified by:
clear
in interface java.util.Collection<TypedNode>
- Specified by:
clear
in interface java.util.List<TypedNode>
- Overrides:
clear
in class java.util.ArrayList<TypedNode>
addAll
public void addAll(TypedNode... nodes)
addAll
public void addAll(int at,
TypedNode... nodes)
removeAll
public void removeAll(TypedNode[] nodes)
copyChildren
public TypedNode[] copyChildren()
updateMixedParent
public void updateMixedParent(java.lang.Object insertMark)