Class MapMessage<K,V>

All Implemented Interfaces:
Serializable, Cloneable

public class MapMessage<K,V> extends ObjectMessage<Map<K,V>>
This class could be used to build message conveying Map objects between MaDKit agents.
Since:
MaDKit 5.1.2
Version:
0.9
Author:
Fabien Michel
See Also:
  • Constructor Details

    • MapMessage

      public MapMessage(Map<K,V> map)
      Builds a MapMessage containing the specified map
      Parameters:
      map - the original map
    • MapMessage

      public MapMessage()
      /** Builds a MapMessage containing an empty HashMap}
  • Method Details

    • put

      public V put(K key, V value)
      invoke Map.put(Object, Object) on the map contained in this message.
      Parameters:
      key - key with which the specified value is to be associated
      value - value to be associated with the specified key
      Returns:
      the previous value associated with key, or null if there was no mapping for key. (A null return can also indicate that the map previously associated null with key, if the implementation supports null values.)
      See Also:
    • get

      public V get(K key)
      invoke Map.get(Object) on the map contained in this message