Package org.opensaml.saml.saml2.metadata.impl

# Class RoleDescriptorXSAnyAdapter.MutableChildrenList<T extends XMLObject>

java.lang.Object
org.opensaml.saml.saml2.metadata.impl.RoleDescriptorXSAnyAdapter.MutableChildrenList<T>

Type Parameters:
  `T` - the type of the list

All Implemented Interfaces:
  `Iterable<T>`, `Collection<T>`, `List<T>`

Enclosing class:
  RoleDescriptorXSAnyAdapter

private class RoleDescriptorXSAnyAdapter.MutableChildrenList<T extends XMLObject> extends Object implements List<T>
Array implementation which causes all XMLObject children of the owning instance to be synced back to the underlying adapted `XSAny` on any list mutation operations.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`private class`
`RoleDescriptorXSAnyAdapter.MutableChildrenList.MutableChildrenIterator<E>`
Iterator for mutable children which disallows removal.
`private class`
`RoleDescriptorXSAnyAdapter.MutableChildrenList.MutableChildrenListIterator<E>`
ListIterator for mutable children which disallows removal.

## Field Summary

Fields
Modifier and Type
Field
Description
`private List<T>`
`storage`
Internal storage for the list.

## Constructor Summary

Constructors
Constructor
Description
`MutableChildrenList(List<T> list)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`add(int index, T element)`
`boolean`
`add(T e)`
`boolean`
`addAll(int index, Collection<? extends T> c)`
`boolean`
`addAll(Collection<? extends T> c)`
`private boolean`
`addAllNoSync(Collection<? extends T> c)`
Same as `addAll(Collection)`, except do not sync back to adapted instance.
`void`
`clear()`
`boolean`
`contains(Object o)`
`boolean`
`containsAll(Collection<?> c)`
`T`
`get(int index)`
`int`
`indexOf(Object o)`
`boolean`
`isEmpty()`
`Iterator<T>`
`iterator()`
`int`
`lastIndexOf(Object o)`
`ListIterator<T>`
`listIterator()`
`ListIterator<T>`
`listIterator(int index)`
`T`
`remove(int index)`
`boolean`
`remove(Object o)`
`boolean`
`removeAll(Collection<?> c)`
`boolean`
`removeIf(Predicate<? super T> filter)`
`void`
`replaceAll(UnaryOperator<T> operator)`
`boolean`
`retainAll(Collection<?> c)`
`T`
`set(int index, T element)`
`int`
`size()`
`List<T>`
`subList(int fromIndex, int toIndex)`
`Object[]`
`toArray()`
`<T> T[]`
`toArray(T[] a)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.Collection

`parallelStream, stream, toArray`

### Methods inherited from interface java.lang.Iterable

`forEach`

### Methods inherited from interface java.util.List

`equals, hashCode, sort, spliterator`

## Field Details

### storage

@Nonnull private List<T extends XMLObject> storage
Internal storage for the list.

## Constructor Details

### MutableChildrenList

public MutableChildrenList(@Nonnull List<T> list)
Constructor.

Parameters:
  `list` - the backing storage for the list

## Method Details

### set

public T set(int index, T element)

Specified by:
  `set` in interface `List<T extends XMLObject>`

### add

public boolean add(T e)

Specified by:
  `add` in interface `Collection<T extends XMLObject>`
Specified by:
  `add` in interface `List<T extends XMLObject>`

### add

public void add(int index, T element)

Specified by:
  `add` in interface `List<T extends XMLObject>`

### remove

public T remove(int index)

Specified by:
  `remove` in interface `List<T extends XMLObject>`

### remove

public boolean remove(Object o)

Specified by:
  `remove` in interface `Collection<T extends XMLObject>`
Specified by:
  `remove` in interface `List<T extends XMLObject>`

### clear

public void clear()

Specified by:
  `clear` in interface `Collection<T extends XMLObject>`
Specified by:
  `clear` in interface `List<T extends XMLObject>`

### addAll

public boolean addAll(Collection<? extends T> c)

Specified by:
  `addAll` in interface `Collection<T extends XMLObject>`
Specified by:
  `addAll` in interface `List<T extends XMLObject>`

### addAll

public boolean addAll(int index, Collection<? extends T> c)

Specified by:
  `addAll` in interface `List<T extends XMLObject>`

### removeAll

public boolean removeAll(Collection<?> c)

Specified by:
  `removeAll` in interface `Collection<T extends XMLObject>`
Specified by:
  `removeAll` in interface `List<T extends XMLObject>`

### retainAll

public boolean retainAll(Collection<?> c)

Specified by:
  `retainAll` in interface `Collection<T extends XMLObject>`
Specified by:
  `retainAll` in interface `List<T extends XMLObject>`

### removeIf

public boolean removeIf(Predicate<? super T> filter)

Specified by:
  `removeIf` in interface `Collection<T extends XMLObject>`

### replaceAll

public void replaceAll(UnaryOperator<T> operator)

Specified by:
  `replaceAll` in interface `List<T extends XMLObject>`

### size

public int size()

Specified by:
  `size` in interface `Collection<T extends XMLObject>`
Specified by:
  `size` in interface `List<T extends XMLObject>`

### isEmpty

public boolean isEmpty()

Specified by:
  `isEmpty` in interface `Collection<T extends XMLObject>`
Specified by:
  `isEmpty` in interface `List<T extends XMLObject>`

### contains

public boolean contains(Object o)

Specified by:
  `contains` in interface `Collection<T extends XMLObject>`
Specified by:
  `contains` in interface `List<T extends XMLObject>`

### toArray

public Object[] toArray()

Specified by:
  `toArray` in interface `Collection<T extends XMLObject>`
Specified by:
  `toArray` in interface `List<T extends XMLObject>`

### toArray

public <T> T[] toArray(T[] a)

Specified by:
  `toArray` in interface `Collection<T extends XMLObject>`
Specified by:
  `toArray` in interface `List<T extends XMLObject>`

### containsAll

public boolean containsAll(Collection<?> c)

Specified by:
  `containsAll` in interface `Collection<T extends XMLObject>`
Specified by:
  `containsAll` in interface `List<T extends XMLObject>`

### get

public T get(int index)

Specified by:
  `get` in interface `List<T extends XMLObject>`

### indexOf

public int indexOf(Object o)

Specified by:
  `indexOf` in interface `List<T extends XMLObject>`

### lastIndexOf

public int lastIndexOf(Object o)

Specified by:
  `lastIndexOf` in interface `List<T extends XMLObject>`

### iterator

public Iterator<T> iterator()

Specified by:
  `iterator` in interface `Collection<T extends XMLObject>`
Specified by:
  `iterator` in interface `Iterable<T extends XMLObject>`
Specified by:
  `iterator` in interface `List<T extends XMLObject>`

### listIterator

public ListIterator<T> listIterator()

Specified by:
  `listIterator` in interface `List<T extends XMLObject>`

### listIterator

public ListIterator<T> listIterator(int index)

Specified by:
  `listIterator` in interface `List<T extends XMLObject>`

### subList

public List<T> subList(int fromIndex, int toIndex)

Specified by:
  `subList` in interface `List<T extends XMLObject>`

### addAllNoSync

private boolean addAllNoSync(Collection<? extends T> c)
Same as `addAll(Collection)`, except do not sync back to adapted instance.

Parameters:
  `c` - collection containing elements to be added to this list
Returns:
  true if this list changed as a result of the call