Package org.dom4j.tree
Class BackedList<T extends Node>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<T>
-
- org.dom4j.tree.BackedList<T>
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<T>
,java.util.Collection<T>
,java.util.List<T>
,java.util.RandomAccess
public class BackedList<T extends Node> extends java.util.ArrayList<T>
BackedList
represents a list of content of aBranch
. Changes to the list will be reflected in the branch, though changes to the branch will not be reflected in this list.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BackedList(AbstractBranch branch, java.util.List<Node> branchContent)
BackedList(AbstractBranch branch, java.util.List<Node> branchContent, int capacity)
BackedList(AbstractBranch branch, java.util.List<Node> branchContent, java.util.List<T> initialContent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, T node)
boolean
add(T node)
boolean
addAll(int index, java.util.Collection<? extends T> collection)
boolean
addAll(java.util.Collection<? extends T> collection)
void
addLocal(T node)
Performs a local addition which is not forward through to the Branch or backing listvoid
clear()
T
remove(int index)
boolean
remove(java.lang.Object object)
T
set(int index, T node)
-
Methods inherited from class java.util.ArrayList
clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeAll, removeIf, removeRange, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Constructor Detail
-
BackedList
public BackedList(AbstractBranch branch, java.util.List<Node> branchContent)
-
BackedList
public BackedList(AbstractBranch branch, java.util.List<Node> branchContent, int capacity)
-
BackedList
public BackedList(AbstractBranch branch, java.util.List<Node> branchContent, java.util.List<T> initialContent)
-
-
Method Detail
-
add
public boolean add(T node)
-
add
public void add(int index, T node)
-
remove
public boolean remove(java.lang.Object object)
-
remove
public T remove(int index)
-
addAll
public boolean addAll(java.util.Collection<? extends T> collection)
-
addAll
public boolean addAll(int index, java.util.Collection<? extends T> collection)
-
clear
public void clear()
-
addLocal
public void addLocal(T node)
Performs a local addition which is not forward through to the Branch or backing list- Parameters:
node
- DOCUMENT ME!
-
-