Class ChangeAwareLists
- java.lang.Object
-
- io.github.mmm.value.observable.container.list.ChangeAwareLists
-
public final class ChangeAwareLists extends Object
Factory forChangeAwareList
.- Since:
- 1.0.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E> ChangeAwareList<E>
empty()
static <E> ChangeAwareList<E>
of()
static <E> ChangeAwareList<E>
of(int capacity)
static <E> ChangeAwareList<E>
of(List<E> list)
static <E> ChangeAwareList<E>
ofUnmodifiable(List<E> list)
-
-
-
Method Detail
-
empty
public static <E> ChangeAwareList<E> empty()
- Type Parameters:
E
- the type of the elements.- Returns:
- an empty, immutable
ChangeAwareList
.
-
of
public static <E> ChangeAwareList<E> of()
- Type Parameters:
E
- the type of the elements.- Returns:
- a new empty mutable
ChangeAwareList
.
-
of
public static <E> ChangeAwareList<E> of(int capacity)
- Type Parameters:
E
- the type of the elements.- Parameters:
capacity
- the initial capacity of the list.- Returns:
- a new empty mutable
ChangeAwareList
.
-
of
public static <E> ChangeAwareList<E> of(List<E> list)
- Type Parameters:
E
- the type of the elements.- Parameters:
list
- the existingList
implementation to wrap asChangeAwareList
. Please avoid to modify thisList
afterwards, as this will not trigger modification events.- Returns:
- a new empty mutable
ChangeAwareList
.
-
ofUnmodifiable
public static <E> ChangeAwareList<E> ofUnmodifiable(List<E> list)
- Type Parameters:
E
- the type of the elements.- Parameters:
list
- the existingList
implementation to wrap asChangeAwareList
. Please avoid to modify thisList
afterwards, as this will not trigger modification events.- Returns:
- a new empty mutable
ChangeAwareList
.
-
-