|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectglobal.sandbox.xmlutilities.NodeListCollection<E>
E
- element typepublic class NodeListCollection<E extends Node>
ArrayList
like implementation for NodeList
which is unmodifiable, not serializable
and exposes access to original NodeList
. The under-layering implementation is based on a copy,
modifications made to the original NodeList
have no effect to iterators.
The name of this class has been chosen in respect to possible collision with org.w3c.dom.NodeList
which may occur during import.
Field Summary | |
---|---|
private Class<E> |
elementType
Class type of elements. |
private static Logger |
LOGGER
Logger. |
private NodeList |
nodeList
Original NodeList . |
private List<E> |
nodes
Unmodifiable implementation. |
Constructor Summary | |
---|---|
NodeListCollection(NodeList nodeList,
Class<E> elementType)
Creates new instance from NodeList . |
Method Summary | ||
---|---|---|
boolean |
add(E e)
|
|
void |
add(int index,
E element)
|
|
boolean |
addAll(Collection<? extends E> c)
|
|
boolean |
addAll(int index,
Collection<? extends E> c)
|
|
void |
clear()
|
|
boolean |
contains(Object o)
|
|
boolean |
containsAll(Collection<?> c)
|
|
boolean |
equals(Object obj)
|
|
E |
get(int index)
|
|
Class<E> |
getElementType()
Returns class type of element. |
|
NodeList |
getNodeList()
Returns under-layering NodeList . |
|
int |
hashCode()
|
|
int |
indexOf(Object o)
|
|
boolean |
isEmpty()
|
|
Iterator<E> |
iterator()
|
|
int |
lastIndexOf(Object o)
|
|
ListIterator<E> |
listIterator()
|
|
ListIterator<E> |
listIterator(int index)
|
|
E |
remove(int index)
|
|
boolean |
remove(Object o)
|
|
boolean |
removeAll(Collection<?> c)
|
|
boolean |
retainAll(Collection<?> c)
|
|
E |
set(int index,
E element)
|
|
int |
size()
|
|
List<E> |
subList(int fromIndex,
int toIndex)
|
|
Object[] |
toArray()
|
|
|
toArray(T[] a)
|
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final Logger LOGGER
private final Class<E extends Node> elementType
private final NodeList nodeList
NodeList
.
private final List<E extends Node> nodes
Constructor Detail |
---|
public NodeListCollection(NodeList nodeList, Class<E> elementType) throws XmlUtilitiesException
NodeList
. The under-layering implementation is constant, read only,
unmodifiable. The implementation is intentionally not serializable.
nodeList
- under-layering NodeList
elementType
- class type of element
XmlUtilitiesException
- on error (casting, data type conversion)Method Detail |
---|
public Class<E> getElementType()
public NodeList getNodeList()
NodeList
.
NodeList
public int size()
size
in interface Collection<E extends Node>
size
in interface List<E extends Node>
public boolean isEmpty()
isEmpty
in interface Collection<E extends Node>
isEmpty
in interface List<E extends Node>
public boolean contains(Object o)
contains
in interface Collection<E extends Node>
contains
in interface List<E extends Node>
public Iterator<E> iterator()
iterator
in interface Iterable<E extends Node>
iterator
in interface Collection<E extends Node>
iterator
in interface List<E extends Node>
public Object[] toArray()
toArray
in interface Collection<E extends Node>
toArray
in interface List<E extends Node>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<E extends Node>
toArray
in interface List<E extends Node>
public boolean add(E e)
add
in interface Collection<E extends Node>
add
in interface List<E extends Node>
public boolean remove(Object o)
remove
in interface Collection<E extends Node>
remove
in interface List<E extends Node>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<E extends Node>
containsAll
in interface List<E extends Node>
public boolean addAll(Collection<? extends E> c)
addAll
in interface Collection<E extends Node>
addAll
in interface List<E extends Node>
public boolean addAll(int index, Collection<? extends E> c)
addAll
in interface List<E extends Node>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<E extends Node>
removeAll
in interface List<E extends Node>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<E extends Node>
retainAll
in interface List<E extends Node>
public void clear()
clear
in interface Collection<E extends Node>
clear
in interface List<E extends Node>
public E get(int index)
get
in interface List<E extends Node>
public E set(int index, E element)
set
in interface List<E extends Node>
public void add(int index, E element)
add
in interface List<E extends Node>
public E remove(int index)
remove
in interface List<E extends Node>
public int indexOf(Object o)
indexOf
in interface List<E extends Node>
public int lastIndexOf(Object o)
lastIndexOf
in interface List<E extends Node>
public ListIterator<E> listIterator()
listIterator
in interface List<E extends Node>
public ListIterator<E> listIterator(int index)
listIterator
in interface List<E extends Node>
public List<E> subList(int fromIndex, int toIndex)
subList
in interface List<E extends Node>
public boolean equals(Object obj)
equals
in interface Collection<E extends Node>
equals
in interface List<E extends Node>
equals
in class Object
public int hashCode()
hashCode
in interface Collection<E extends Node>
hashCode
in interface List<E extends Node>
hashCode
in class Object
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |