Class MapEntryMap<K,V>

java.lang.Object
com.globalmentor.collections.MapEntryMap<K,V>
Type Parameters:
K - The type of key contained in the map.
V - The type of value contained in the map.
All Implemented Interfaces:
ImmutableMap<K,V>, Map<K,V>

public class MapEntryMap<K,V> extends Object implements Map<K,V>, ImmutableMap<K,V>
A read-only map containing a single map entry.
Author:
Garret Wilson
  • Constructor Details

    • MapEntryMap

      public MapEntryMap(K key, V value)
      Key and value constructor.
      Parameters:
      key - The key to hold in the map.
      value - The value to hold in the map.
    • MapEntryMap

      public MapEntryMap(NameValuePair<K,V> nameValuePair)
      Name/value pair copy constructor.
      Parameters:
      nameValuePair - The name/value pair the values of which to hold in the map.
      Throws:
      NullPointerException - if the given name/value pair is null.
    • MapEntryMap

      public MapEntryMap(Map.Entry<K,V> mapEntry)
      Map entry copy constructor.
      Parameters:
      mapEntry - The map entry the values of which to hold in the map.
      Throws:
      NullPointerException - if the given map entry is null.
  • Method Details