Class PrismReferenceArrayList<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<T>
com.evolveum.midpoint.prism.impl.xjc.PrismReferenceArrayList<T>
- All Implemented Interfaces:
PrismList
,Serializable
,Iterable<T>
,Collection<T>
,List<T>
- Direct Known Subclasses:
ContainerablePrismBinding.ReferencableList
public abstract class PrismReferenceArrayList<T>
extends AbstractList<T>
implements Serializable, PrismList
- Author:
- lazyman TODO: account for concurrent structural modifications using modCount property
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorDescriptionPrismReferenceArrayList
(PrismReference reference, PrismContainerValue<?> parent) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends T> ts) void
clear()
JAXB unmarshaller is calling clear() on lists even though they were just created.protected abstract T
createItem
(PrismReferenceValue value) get
(int i) protected PrismReference
protected abstract PrismReferenceValue
getValueFrom
(T t) boolean
isEmpty()
remove
(int i) boolean
boolean
removeAll
(Collection<?> objects) int
size()
protected abstract boolean
willClear
(PrismReferenceValue value) Methods inherited from class java.util.AbstractList
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, set, subList
Methods inherited from class java.util.AbstractCollection
contains, containsAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
contains, containsAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Constructor Details
-
PrismReferenceArrayList
-
-
Method Details
-
getReference
-
get
-
size
public int size()- Specified by:
size
in interfaceCollection<T>
- Specified by:
size
in interfaceList<T>
- Specified by:
size
in classAbstractCollection<T>
-
createItem
-
getValueFrom
-
remove
-
removeAll
- Specified by:
removeAll
in interfaceCollection<T>
- Specified by:
removeAll
in interfaceList<T>
- Overrides:
removeAll
in classAbstractCollection<T>
-
remove
- Specified by:
remove
in interfaceCollection<T>
- Specified by:
remove
in interfaceList<T>
- Overrides:
remove
in classAbstractCollection<T>
-
add
- Specified by:
add
in interfaceCollection<T>
- Specified by:
add
in interfaceList<T>
- Overrides:
add
in classAbstractList<T>
-
addAll
- Specified by:
addAll
in interfaceCollection<T>
- Specified by:
addAll
in interfaceList<T>
- Overrides:
addAll
in classAbstractCollection<T>
-
clear
public void clear()JAXB unmarshaller is calling clear() on lists even though they were just created. As the references should be visible as two JAXB fields, clearing one of them will also clear the other. Therefore we need this hack. Calling clear() will only clear the values that naturally "belong" to the list.- Specified by:
clear
in interfaceCollection<T>
- Specified by:
clear
in interfaceList<T>
- Overrides:
clear
in classAbstractList<T>
-
willClear
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<T>
- Specified by:
isEmpty
in interfaceList<T>
- Overrides:
isEmpty
in classAbstractCollection<T>
-