Class MapBuilder<K,​V>

  • public class MapBuilder<K,​V>
    extends java.lang.Object
    • Constructor Detail

      • MapBuilder

        public MapBuilder()
      • MapBuilder

        public MapBuilder​(java.util.Map<K,​V> map)
    • Method Detail

      • newMapBuilder

        public static <K,​V> MapBuilder<K,​V> newMapBuilder()
      • newMapBuilder

        public static <K,​V> MapBuilder<K,​V> newMapBuilder​(java.util.Map<K,​V> map)
      • putAll

        public MapBuilder<K,​V> putAll​(java.util.Map<K,​V> map)
      • get

        public V get​(K key)
      • containsKey

        public boolean containsKey​(K key)
      • isEmpty

        public boolean isEmpty()
      • map

        public java.util.Map<K,​V> map()
      • immutableMap

        public java.util.Map<K,​V> immutableMap()
        Build an immutable copy of the map under construction. Always copies the map under construction. Prefer building a HashMap by hand and wrapping it in an unmodifiableMap