public class GenericMessage extends Message implements java.util.Map<java.lang.Object,java.lang.Object>
Constructor and Description |
---|
GenericMessage()
Creates an empty generic message.
|
GenericMessage(AgentID recipient)
Creates a generic new message.
|
GenericMessage(AgentID recipient,
Performative perf)
Creates a generic new message.
|
GenericMessage(Message inReplyTo)
Creates a generic response message.
|
GenericMessage(Message inReplyTo,
Performative perf)
Creates a generic response message.
|
GenericMessage(Performative perf)
Creates a generic new message.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
java.util.Set<java.util.Map.Entry<java.lang.Object,java.lang.Object>> |
entrySet() |
java.lang.Object |
get(java.lang.Object key) |
double |
get(java.lang.Object key,
double defVal)
Gets the double value associated with a key.
|
int |
get(java.lang.Object key,
int defVal)
Gets the integer value associated with a key.
|
long |
get(java.lang.Object key,
long defVal)
Gets the long value associated with a key.
|
java.lang.String |
get(java.lang.Object key,
java.lang.String defVal)
Gets the string value associated with a key.
|
boolean |
isEmpty() |
java.util.Set<java.lang.Object> |
keySet() |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value) |
void |
putAll(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> map) |
java.lang.Object |
remove(java.lang.Object key) |
int |
size() |
java.util.Collection<java.lang.Object> |
values() |
getInReplyTo, getJsonCache, getMessageID, getPerformative, getRecipient, getSender, getSentAt, setInReplyTo, setJsonCache, setMessageID, setPerformative, setRecipient, setSender, setSentAt, toString
public GenericMessage()
public GenericMessage(Performative perf)
perf
- performative.public GenericMessage(AgentID recipient)
recipient
- agent id of recipient agent or topic.public GenericMessage(AgentID recipient, Performative perf)
recipient
- agent id of recipient agent or topic.perf
- performative.public GenericMessage(Message inReplyTo)
inReplyTo
- message to which this response corresponds to.public GenericMessage(Message inReplyTo, Performative perf)
inReplyTo
- message to which this response corresponds to.perf
- performative.public void clear()
clear
in interface java.util.Map<java.lang.Object,java.lang.Object>
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map<java.lang.Object,java.lang.Object>
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map<java.lang.Object,java.lang.Object>
public java.util.Set<java.util.Map.Entry<java.lang.Object,java.lang.Object>> entrySet()
entrySet
in interface java.util.Map<java.lang.Object,java.lang.Object>
public boolean isEmpty()
isEmpty
in interface java.util.Map<java.lang.Object,java.lang.Object>
public java.util.Set<java.lang.Object> keySet()
keySet
in interface java.util.Map<java.lang.Object,java.lang.Object>
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
put
in interface java.util.Map<java.lang.Object,java.lang.Object>
public java.lang.Object get(java.lang.Object key)
get
in interface java.util.Map<java.lang.Object,java.lang.Object>
public void putAll(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> map)
putAll
in interface java.util.Map<java.lang.Object,java.lang.Object>
public java.lang.Object remove(java.lang.Object key)
remove
in interface java.util.Map<java.lang.Object,java.lang.Object>
public int size()
size
in interface java.util.Map<java.lang.Object,java.lang.Object>
public java.util.Collection<java.lang.Object> values()
values
in interface java.util.Map<java.lang.Object,java.lang.Object>
public java.lang.String get(java.lang.Object key, java.lang.String defVal)
key
- the key.defVal
- default value to return, if the key is not found.public int get(java.lang.Object key, int defVal)
key
- the key.defVal
- default value to return, if the key is not found.java.lang.NumberFormatException
- if the value is not numeric.public long get(java.lang.Object key, long defVal)
key
- the key.defVal
- default value to return, if the key is not found.java.lang.NumberFormatException
- if the value is not numeric.public double get(java.lang.Object key, double defVal)
key
- the key.defVal
- default value to return, if the key is not found.java.lang.NumberFormatException
- if the value is not numeric.