Class ChangeAwareSets
java.lang.Object
io.github.mmm.value.observable.container.set.ChangeAwareSets
Factory for
ChangeAwareSet.- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> ChangeAwareSet<E> empty()static <E> ChangeAwareSet<E> of()static <E> ChangeAwareSet<E> of(int capacity) static <E> ChangeAwareSet<E> static <E> ChangeAwareSet<E> ofUnmodifiable(Supplier<Set<E>> setSupplier) static <E> ChangeAwareSet<E> ofUnmodifiable(Set<E> set)
-
Method Details
-
empty
- Type Parameters:
E- the type of the elements.- Returns:
- an empty, immutable
ChangeAwareSet.
-
of
- Type Parameters:
E- the type of the elements.- Returns:
- a new empty mutable
ChangeAwareSet.
-
of
- Type Parameters:
E- the type of the elements.- Parameters:
capacity- the initial capacity of the set.- Returns:
- a new empty mutable
ChangeAwareSet.
-
of
- Type Parameters:
E- the type of the elements.- Parameters:
set- the existingSetimplementation to wrap asChangeAwareSet. Please avoid to modify thisSetafterwards, as this will not trigger modification events.- Returns:
- a new empty mutable
ChangeAwareSet.
-
ofUnmodifiable
- Type Parameters:
E- the type of the elements.- Parameters:
set- the existingListimplementation to wrap asChangeAwareList. Modifying suchListafterwards will not trigger modification events in the read-only view returned by this method.- Returns:
- an unmodifiable
ChangeAwareListthat acts as a view on the givenSet.
-
ofUnmodifiable
- Type Parameters:
E- the type of the elements.- Parameters:
setSupplier- the existingListimplementation to wrap asChangeAwareList. Modifying suchListafterwards will not trigger modification events in the read-only view returned by this method.- Returns:
- an unmodifiable
ChangeAwareListthat acts as a view on thesuppliedSet.
-