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>
public abstract class PrismReferenceArrayList<T> extends AbstractList<T> implements Serializable, PrismList
- Author:
- lazyman TODO: account for concurrent structural modifications using modCount property
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description PrismReferenceArrayList(PrismReference reference, PrismContainerValue<?> parent)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
add(T t)
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)
T
get(int i)
protected PrismReference
getReference()
protected abstract PrismReferenceValue
getValueFrom(T t)
boolean
isEmpty()
T
remove(int i)
boolean
remove(Object o)
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 Detail
-
PrismReferenceArrayList
public PrismReferenceArrayList(PrismReference reference, PrismContainerValue<?> parent)
-
-
Method Detail
-
getReference
protected PrismReference getReference()
-
get
public T get(int i)
-
size
public int size()
- Specified by:
size
in interfaceCollection<T>
- Specified by:
size
in interfaceList<T>
- Specified by:
size
in classAbstractCollection<T>
-
createItem
protected abstract T createItem(PrismReferenceValue value)
-
getValueFrom
protected abstract PrismReferenceValue getValueFrom(T t)
-
remove
public T remove(int i)
-
removeAll
public boolean removeAll(Collection<?> objects)
- Specified by:
removeAll
in interfaceCollection<T>
- Specified by:
removeAll
in interfaceList<T>
- Overrides:
removeAll
in classAbstractCollection<T>
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<T>
- Specified by:
remove
in interfaceList<T>
- Overrides:
remove
in classAbstractCollection<T>
-
add
public boolean add(T t)
- Specified by:
add
in interfaceCollection<T>
- Specified by:
add
in interfaceList<T>
- Overrides:
add
in classAbstractList<T>
-
addAll
public boolean addAll(Collection<? extends T> ts)
- 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
protected abstract boolean willClear(PrismReferenceValue value)
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<T>
- Specified by:
isEmpty
in interfaceList<T>
- Overrides:
isEmpty
in classAbstractCollection<T>
-
-