ElementType
- the type of element added to the list@NotThreadSafe public class IndexedXMLObjectChildrenList<ElementType extends XMLObject> extends XMLObjectChildrenList<ElementType>
modCount
Constructor and Description |
---|
IndexedXMLObjectChildrenList(XMLObject parent)
Constructor.
|
IndexedXMLObjectChildrenList(XMLObject parent,
Collection<ElementType> col)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
ElementType element)
Inserts the specified element at the specified position in this list.
|
protected void |
checkAndCreateIndex(QName index)
Check for the existence of an index for the specified QName and create it
if it doesn't exist.
|
void |
clear() |
List<ElementType> |
get(QName typeOrName)
Retrieves all the SAMLObjects that have given schema type or element name.
|
protected void |
indexElement(ElementType element)
Indexes the given SAMLObject by type and element name.
|
protected void |
indexElement(QName index,
ElementType element)
Indexes the given SAMLobject by the given index.
|
boolean |
remove(ElementType element)
Removes a given element from the list and index.
|
ElementType |
remove(int index)
Removes the element at the specified position in this list.
|
protected void |
removeElementFromIndex(ElementType element)
Removes the given element from the schema type and element qname index.
|
protected void |
removeElementFromIndex(QName index,
ElementType element)
Removes an object from the given index id.
|
ElementType |
set(int index,
ElementType element)
Replaces the element at the specified position in this list with the specified element.
|
List<? extends ElementType> |
subList(QName index)
Returns a view of the list that only contains elements stored under the given index.
|
contains, get, setParent, size
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
public IndexedXMLObjectChildrenList(XMLObject parent)
parent
- the parent of the XMLObject
s added to the listpublic IndexedXMLObjectChildrenList(XMLObject parent, Collection<ElementType> col)
parent
- the parent of all elementscol
- collection to add to this listpublic void add(int index, ElementType element)
add
in interface List<ElementType extends XMLObject>
add
in class XMLObjectChildrenList<ElementType extends XMLObject>
index
- index of element to addelement
- element to be stored at the specified positionpublic void clear()
clear
in interface Collection<ElementType extends XMLObject>
clear
in interface List<ElementType extends XMLObject>
clear
in class AbstractList<ElementType extends XMLObject>
public List<ElementType> get(QName typeOrName)
typeOrName
- the schema type or element nameprotected void checkAndCreateIndex(QName index)
index
- the index to checkprotected void indexElement(ElementType element)
element
- the SAMLObject to indexprotected void indexElement(QName index, ElementType element)
index
- the index for the elementelement
- the element to be indexedpublic boolean remove(ElementType element)
remove
in class XMLObjectChildrenList<ElementType extends XMLObject>
element
- the element to be removedpublic ElementType remove(int index)
remove
in interface List<ElementType extends XMLObject>
remove
in class XMLObjectChildrenList<ElementType extends XMLObject>
index
- the index of the element to removeprotected void removeElementFromIndex(ElementType element)
element
- the element to remove from the indexprotected void removeElementFromIndex(QName index, ElementType element)
index
- the id of the indexelement
- the element to be removed from that indexpublic ElementType set(int index, ElementType element)
set
in interface List<ElementType extends XMLObject>
set
in class XMLObjectChildrenList<ElementType extends XMLObject>
index
- index of element to replaceelement
- element to be stored at the specified positionpublic List<? extends ElementType> subList(QName index)
index
- index of the elements returned in the list viewCopyright © 1999–2016. All rights reserved.