Class MapBuilder<K,V>

java.lang.Object
org.hisp.dhis.util.MapBuilder<K,V>

public class MapBuilder<K,V> extends Object
Builder of maps.
  • Constructor Details

    • MapBuilder

      public MapBuilder()
  • Method Details

    • put

      public MapBuilder<K,V> put(K key, V value)
      Associates the specified value with the specified key in this map.
      Parameters:
      key - the key.
      value - the value.
      Returns:
      this MapBuilder.
    • putIfAbsent

      public MapBuilder<K,V> putIfAbsent(K key, V value)
      If the specified key is not already associated with a value (or is mapped to null) associates it with the given value and returns null, else returns the current value.
      Parameters:
      key - the key.
      value - the value.
      Returns:
      this MapBuilder.
    • build

      public Map<K,V> build()
      Builds the map.
      Returns:
      the Map.