Package madkit.message
Class MapMessage<K,V>
- All Implemented Interfaces:
Serializable,Cloneable
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 Summary
ConstructorsConstructorDescription/** Builds aMapMessagecontaining an emptyHashMap}MapMessage(Map<K, V> map) Builds aMapMessagecontaining the specified map -
Method Summary
Modifier and TypeMethodDescriptioninvokeMap.get(Object)on the map contained in this messageinvokeMap.put(Object, Object)on the map contained in this message.Methods inherited from class madkit.message.ObjectMessage
getContent, max, min, sort, toStringMethods inherited from class madkit.kernel.Message
clone, getConversationID, getReceiver, getSender
-
Constructor Details
-
MapMessage
Builds aMapMessagecontaining the specified map- Parameters:
map- the original map
-
MapMessage
public MapMessage()/** Builds aMapMessagecontaining an emptyHashMap}
-
-
Method Details
-
put
invokeMap.put(Object, Object)on the map contained in this message.- Parameters:
key- key with which the specified value is to be associatedvalue- 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
invokeMap.get(Object)on the map contained in this message
-