Class NameValuePairMapEntry<K,V>

java.lang.Object
com.globalmentor.model.DefaultNamed<N>
com.globalmentor.model.NameValuePair<K,V>
com.globalmentor.collections.NameValuePairMapEntry<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:
IDed<K>, Named<K>, Valued<V>, Map.Entry<K,V>

public class NameValuePairMapEntry<K,V> extends NameValuePair<K,V> implements Map.Entry<K,V>
A read-only map entry that is also a name/value pair.
Author:
Garret Wilson
  • Constructor Details

    • NameValuePairMapEntry

      public NameValuePairMapEntry(K name, V value)
      Constructor specifying the name and value.
      Parameters:
      name - The object's new name.
      value - The object's new value
    • NameValuePairMapEntry

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

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