Package com.evolveum.midpoint.prism
Class FreezableList<T>
- java.lang.Object
-
- com.evolveum.midpoint.prism.AbstractFreezable
-
- com.evolveum.midpoint.prism.FreezableList<T>
-
- Type Parameters:
T
- type of list items
- All Implemented Interfaces:
Freezable
,Serializable
,Iterable<T>
,Collection<T>
,List<T>
- Direct Known Subclasses:
DeeplyFreezableList
@Experimental public class FreezableList<T> extends AbstractFreezable implements Serializable, List<T>
A list that can be made immutable. The expected use of this class is to be a `final` field in a class.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FreezableList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, T element)
boolean
add(T t)
boolean
addAll(int index, @NotNull Collection<? extends T> c)
boolean
addAll(@NotNull Collection<? extends T> c)
void
clear()
boolean
contains(Object o)
boolean
containsAll(@NotNull Collection<?> c)
T
get(int index)
int
indexOf(Object o)
boolean
isEmpty()
@NotNull Iterator<T>
iterator()
int
lastIndexOf(Object o)
@NotNull ListIterator<T>
listIterator()
@NotNull ListIterator<T>
listIterator(int index)
protected void
performFreeze()
T
remove(int index)
boolean
remove(Object o)
boolean
removeAll(@NotNull Collection<?> c)
boolean
retainAll(@NotNull Collection<?> c)
T
set(int index, T element)
int
size()
@NotNull List<T>
subList(int fromIndex, int toIndex)
@NotNull Object @NotNull []
toArray()
<T1> @NotNull T1 @NotNull []
toArray(@NotNull T1 @NotNull [] a)
-
Methods inherited from class com.evolveum.midpoint.prism.AbstractFreezable
freeze, freeze, freezeAll, freezeNullableList, isImmutable, isMutable
-
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, removeIf, stream, toArray
-
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable
-
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
-
-
-
Method Detail
-
performFreeze
protected void performFreeze()
- Overrides:
performFreeze
in classAbstractFreezable
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(Object o)
-
toArray
@NotNull public @NotNull Object @NotNull [] toArray()
-
toArray
@NotNull public <T1> @NotNull T1 @NotNull [] toArray(@NotNull @NotNull T1 @NotNull [] a)
-
add
public boolean add(T t)
-
remove
public boolean remove(Object o)
-
containsAll
public boolean containsAll(@NotNull @NotNull Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<T>
- Specified by:
containsAll
in interfaceList<T>
-
addAll
public boolean addAll(@NotNull @NotNull Collection<? extends T> c)
-
addAll
public boolean addAll(int index, @NotNull @NotNull Collection<? extends T> c)
-
removeAll
public boolean removeAll(@NotNull @NotNull Collection<?> c)
-
retainAll
public boolean retainAll(@NotNull @NotNull Collection<?> c)
-
clear
public void clear()
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOf
in interfaceList<T>
-
listIterator
@NotNull public @NotNull ListIterator<T> listIterator()
- Specified by:
listIterator
in interfaceList<T>
-
listIterator
@NotNull public @NotNull ListIterator<T> listIterator(int index)
- Specified by:
listIterator
in interfaceList<T>
-
-