Class ChangeAwareSets
- java.lang.Object
-
- io.github.mmm.value.observable.container.set.ChangeAwareSets
-
public final class ChangeAwareSets extends Object
Factory forChangeAwareSet
.- Since:
- 1.0.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E> ChangeAwareSet<E>
empty()
static <E> ChangeAwareSet<E>
of()
static <E> ChangeAwareSet<E>
of(int capacity)
static <E> ChangeAwareSet<E>
of(Set<E> set)
static <E> ChangeAwareSet<E>
ofUnmodifiable(Set<E> set)
-
-
-
Method Detail
-
empty
public static <E> ChangeAwareSet<E> empty()
- Type Parameters:
E
- the type of the elements.- Returns:
- an empty, immutable
ChangeAwareSet
.
-
of
public static <E> ChangeAwareSet<E> of()
- Type Parameters:
E
- the type of the elements.- Returns:
- a new empty mutable
ChangeAwareSet
.
-
of
public static <E> ChangeAwareSet<E> of(int capacity)
- Type Parameters:
E
- the type of the elements.- Parameters:
capacity
- the initial capacity of the set.- Returns:
- a new empty mutable
ChangeAwareSet
.
-
of
public static <E> ChangeAwareSet<E> of(Set<E> set)
- Type Parameters:
E
- the type of the elements.- Parameters:
set
- the existingSet
implementation to wrap asChangeAwareSet
. Please avoid to modify thisSet
afterwards, as this will not trigger modification events.- Returns:
- a new empty mutable
ChangeAwareSet
.
-
ofUnmodifiable
public static <E> ChangeAwareSet<E> ofUnmodifiable(Set<E> set)
- Type Parameters:
E
- the type of the elements.- Parameters:
set
- 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
.
-
-