Class ChangeAwareMaps
- java.lang.Object
-
- io.github.mmm.value.observable.container.map.ChangeAwareMaps
-
public final class ChangeAwareMaps extends Object
Factory forChangeAwareMap
.- Since:
- 1.0.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <K,V>
ChangeAwareMap<K,V>empty()
static <K,V>
ChangeAwareMap<K,V>of()
static <K,V>
ChangeAwareMap<K,V>of(int capacity)
static <K,V>
ChangeAwareMap<K,V>of(Map<K,V> map)
static <K,V>
ChangeAwareMap<K,V>ofUnmodifiable(Map<K,V> map)
-
-
-
Method Detail
-
empty
public static <K,V> ChangeAwareMap<K,V> empty()
- Type Parameters:
K
- type of thekeys
.V
- type of thevalues
.- Returns:
- an empty, immutable
ChangeAwareMap
.
-
of
public static <K,V> ChangeAwareMap<K,V> of()
- Type Parameters:
K
- type of thekeys
.V
- type of thevalues
.- Returns:
- a new empty mutable
ChangeAwareMap
.
-
of
public static <K,V> ChangeAwareMap<K,V> of(int capacity)
- Type Parameters:
K
- type of thekeys
.V
- type of thevalues
.- Parameters:
capacity
- the initial capacity of the map.- Returns:
- a new empty mutable
ChangeAwareMap
.
-
of
public static <K,V> ChangeAwareMap<K,V> of(Map<K,V> map)
- Type Parameters:
K
- type of thekeys
.V
- type of thevalues
.- Parameters:
map
- the existingSet
implementation to wrap asChangeAwareMap
. Please avoid to modify thisMap
afterwards, as this will not trigger modification events.- Returns:
- a new empty mutable
ChangeAwareMap
.
-
ofUnmodifiable
public static <K,V> ChangeAwareMap<K,V> ofUnmodifiable(Map<K,V> map)
- Type Parameters:
K
- type of thekeys
.V
- type of thevalues
.- Parameters:
map
- the existingMap
implementation to wrap asChangeAwareMap
. Please avoid to modify thisMap
afterwards, as this will not trigger modification events.- Returns:
- a new empty mutable
ChangeAwareList
.
-
-