java.lang.Object
io.github.mmm.value.observable.container.map.ChangeAwareMaps

public final class ChangeAwareMaps extends Object
Factory for ChangeAwareMap.
Since:
1.0.0
  • Method Details

    • empty

      public static <K, V> ChangeAwareMap<K,V> empty()
      Type Parameters:
      K - type of the keys.
      V - type of the values.
      Returns:
      an empty, immutable ChangeAwareMap.
    • of

      public static <K, V> ChangeAwareMap<K,V> of()
      Type Parameters:
      K - type of the keys.
      V - type of the values.
      Returns:
      a new empty mutable ChangeAwareMap.
    • of

      public static <K, V> ChangeAwareMap<K,V> of(int capacity)
      Type Parameters:
      K - type of the keys.
      V - type of the values.
      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 the keys.
      V - type of the values.
      Parameters:
      map - the existing Set implementation to wrap as ChangeAwareMap. Please avoid to modify this Map 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 the keys.
      V - type of the values.
      Parameters:
      map - the existing Map implementation to wrap as ChangeAwareMap. Please avoid to modify this Map afterwards, as this will not trigger modification events.
      Returns:
      a new empty mutable ChangeAwareList.