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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, @NotNull Collection<? extends T> c) booleanaddAll(@NotNull Collection<? extends T> c) voidclear()booleanbooleancontainsAll(@NotNull Collection<?> c) get(int index) intbooleanisEmpty()iterator()int@NotNull ListIterator<T>@NotNull ListIterator<T>listIterator(int index) protected voidremove(int index) booleanbooleanremoveAll(@NotNull Collection<?> c) booleanretainAll(@NotNull Collection<?> c) intsize()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, isMutableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutableMethods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
Constructor Details
-
FreezableList
public FreezableList() -
FreezableList
-
-
Method Details
-
performFreeze
protected void performFreeze()- Overrides:
performFreezein classAbstractFreezable
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
iterator
-
toArray
-
toArray
@NotNull public <T1> @NotNull T1 @NotNull [] toArray(@NotNull @NotNull T1 @NotNull [] a) -
add
-
remove
-
containsAll
- Specified by:
containsAllin interfaceCollection<T>- Specified by:
containsAllin interfaceList<T>
-
addAll
-
addAll
-
removeAll
-
retainAll
-
clear
public void clear() -
get
-
set
-
add
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<T>
-
listIterator
- Specified by:
listIteratorin interfaceList<T>
-
listIterator
- Specified by:
listIteratorin interfaceList<T>
-
subList
-