Package org.opensaml.core.xml.util
Class ListView<ElementType extends XMLObject>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<ElementType>
org.opensaml.core.xml.util.ListView<ElementType>
- Type Parameters:
ElementType- the XMLObject type that this list operates on
- All Implemented Interfaces:
Iterable<ElementType>,Collection<ElementType>,List<ElementType>
A special list that works as a view of an IndexedXMLObjectChildrenList showing only the sublist associated with a
given index. Operations performed on this sublist are reflected in the backing list. Index-based mutation operations
are not supported.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IndexedXMLObjectChildrenList<ElementType>List that backs this view.private final QNameIndex that points to the list, in the backing list, that this view operates on.private List<ElementType>List, in the backing list, that the given index points to.Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionListView(IndexedXMLObjectChildrenList<ElementType> newBackingList, QName newIndex) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int newIndex, ElementType element) booleanadd(ElementType o) booleanaddAll(int i, Collection<? extends ElementType> c) booleanaddAll(Collection<? extends ElementType> c) voidclear()booleanChecks to see if the given element is contained in this list.booleancontainsAll(Collection<?> c) get(int newIndex) intbooleanisEmpty()intremove(int newIndex) booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) set(int newIndex, ElementType element) intsize()Object[]toArray()<T> T[]toArray(T[] a) Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, removeRange, subListMethods inherited from class java.util.AbstractCollection
toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
replaceAll, sort, spliterator
-
Field Details
-
backingList
List that backs this view. -
index
Index that points to the list, in the backing list, that this view operates on. -
indexList
List, in the backing list, that the given index points to.
-
-
Constructor Details
-
ListView
public ListView(@Nonnull IndexedXMLObjectChildrenList<ElementType> newBackingList, @Nonnull QName newIndex) Constructor.- Parameters:
newBackingList- the list that backs this viewnewIndex- the element schema type or name of the sublist this view operates on
-
-
Method Details
-
add
- Specified by:
addin interfaceCollection<ElementType extends XMLObject>- Specified by:
addin interfaceList<ElementType extends XMLObject>- Overrides:
addin classAbstractList<ElementType extends XMLObject>
-
add
- Specified by:
addin interfaceList<ElementType extends XMLObject>- Overrides:
addin classAbstractList<ElementType extends XMLObject>
-
addAll
- Specified by:
addAllin interfaceCollection<ElementType extends XMLObject>- Specified by:
addAllin interfaceList<ElementType extends XMLObject>- Overrides:
addAllin classAbstractCollection<ElementType extends XMLObject>
-
addAll
- Specified by:
addAllin interfaceList<ElementType extends XMLObject>- Overrides:
addAllin classAbstractList<ElementType extends XMLObject>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<ElementType extends XMLObject>- Specified by:
clearin interfaceList<ElementType extends XMLObject>- Overrides:
clearin classAbstractList<ElementType extends XMLObject>
-
contains
Checks to see if the given element is contained in this list.- Specified by:
containsin interfaceCollection<ElementType extends XMLObject>- Specified by:
containsin interfaceList<ElementType extends XMLObject>- Overrides:
containsin classAbstractCollection<ElementType extends XMLObject>- Parameters:
element- the element to check for- Returns:
- true if the element is in this list, false if not
-
containsAll
- Specified by:
containsAllin interfaceCollection<ElementType extends XMLObject>- Specified by:
containsAllin interfaceList<ElementType extends XMLObject>- Overrides:
containsAllin classAbstractCollection<ElementType extends XMLObject>
-
get
- Specified by:
getin interfaceList<ElementType extends XMLObject>- Specified by:
getin classAbstractList<ElementType extends XMLObject>
-
indexOf
- Specified by:
indexOfin interfaceList<ElementType extends XMLObject>- Overrides:
indexOfin classAbstractList<ElementType extends XMLObject>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<ElementType extends XMLObject>- Specified by:
isEmptyin interfaceList<ElementType extends XMLObject>- Overrides:
isEmptyin classAbstractCollection<ElementType extends XMLObject>
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<ElementType extends XMLObject>- Overrides:
lastIndexOfin classAbstractList<ElementType extends XMLObject>
-
remove
- Specified by:
removein interfaceList<ElementType extends XMLObject>- Overrides:
removein classAbstractList<ElementType extends XMLObject>
-
remove
- Specified by:
removein interfaceCollection<ElementType extends XMLObject>- Specified by:
removein interfaceList<ElementType extends XMLObject>- Overrides:
removein classAbstractCollection<ElementType extends XMLObject>
-
removeAll
- Specified by:
removeAllin interfaceCollection<ElementType extends XMLObject>- Specified by:
removeAllin interfaceList<ElementType extends XMLObject>- Overrides:
removeAllin classAbstractCollection<ElementType extends XMLObject>
-
retainAll
- Specified by:
retainAllin interfaceCollection<ElementType extends XMLObject>- Specified by:
retainAllin interfaceList<ElementType extends XMLObject>- Overrides:
retainAllin classAbstractCollection<ElementType extends XMLObject>
-
set
- Specified by:
setin interfaceList<ElementType extends XMLObject>- Overrides:
setin classAbstractList<ElementType extends XMLObject>
-
size
public int size()- Specified by:
sizein interfaceCollection<ElementType extends XMLObject>- Specified by:
sizein interfaceList<ElementType extends XMLObject>- Specified by:
sizein classAbstractCollection<ElementType extends XMLObject>
-
toArray
- Specified by:
toArrayin interfaceCollection<ElementType extends XMLObject>- Specified by:
toArrayin interfaceList<ElementType extends XMLObject>- Overrides:
toArrayin classAbstractCollection<ElementType extends XMLObject>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<ElementType extends XMLObject>- Specified by:
toArrayin interfaceList<ElementType extends XMLObject>- Overrides:
toArrayin classAbstractCollection<ElementType extends XMLObject>
-