Package org.dom4j.tree
Class ContentListFacade<T extends Node>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<T>
-
- org.dom4j.tree.ContentListFacade<T>
-
- All Implemented Interfaces:
java.lang.Iterable<T>
,java.util.Collection<T>
,java.util.List<T>
public class ContentListFacade<T extends Node> extends java.util.AbstractList<T>
ContentListFacade
represents a facade of the content of aBranch
which is returned via calls to theBranch.content()
method to allow users to modify the content of aBranch
directly using theList
interface. This list is backed by the branch such that changes to the list will be reflected in the branch and changes to the branch will be reflected in this list.
-
-
Constructor Summary
Constructors Constructor Description ContentListFacade(AbstractBranch branch, java.util.List<T> branchContent)
-
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)
protected Node
asNode(java.lang.Object object)
void
clear()
boolean
contains(java.lang.Object o)
boolean
containsAll(java.util.Collection<?> c)
T
get(int index)
protected java.util.List<T>
getBackingList()
int
indexOf(java.lang.Object o)
boolean
isEmpty()
int
lastIndexOf(java.lang.Object o)
T
remove(int index)
boolean
remove(java.lang.Object object)
boolean
removeAll(java.util.Collection<?> c)
T
set(int index, T node)
int
size()
java.lang.Object[]
toArray()
java.lang.Object[]
toArray(java.lang.Object[] a)
-
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, removeRange, subList
-
-
-
-
Constructor Detail
-
ContentListFacade
public ContentListFacade(AbstractBranch branch, java.util.List<T> branchContent)
-
-
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()
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(java.lang.Object o)
-
toArray
public java.lang.Object[] toArray()
-
toArray
public java.lang.Object[] toArray(java.lang.Object[] a)
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
-
get
public T get(int index)
-
indexOf
public int indexOf(java.lang.Object o)
-
lastIndexOf
public int lastIndexOf(java.lang.Object o)
-
asNode
protected Node asNode(java.lang.Object object)
-
getBackingList
protected java.util.List<T> getBackingList()
-
-