public class SimpleContextMap extends Object implements Serializable, ContextMap
| Constructor and Description |
|---|
SimpleContextMap() |
SimpleContextMap(Map<?,?> attributesMap) |
| Modifier and Type | Method and Description |
|---|---|
Object |
clear(String key)
Remove all entries from the Map.
|
Boolean |
getBoolean(String key,
Boolean... optional)
Return the Boolean value stored a the key, or the value of optional if
absent.
|
Float |
getFloat(String key,
Float... optional)
Return the Float value stored a the key, or the value of optional if
absent.
|
Integer |
getInteger(String key,
Integer... optional)
Return the Integer value stored a the key, or the value of optional if
absent.
|
Long |
getLong(String key,
Long... optional)
Return the Float value stored a the key, or the value of optional if
absent.
|
Object |
getObject(String key,
Object... optional)
Return the Object value stored a the key, or the value of optional if
absent.
|
String |
getString(String key,
String... optional)
Return the String value stored a the key, or the value of optional if
absent.
|
Map<Object,Object> |
toMap()
Return a new Map containing all the context key,value pairs.
|
String |
toString() |
SimpleContextMap |
withBoolean(String key,
Boolean value)
Add (or overwrite) a key,Boolean pair to the Map.
|
SimpleContextMap |
withFloat(String key,
Float value)
Add (or overwrite) a key,Float pair to the Map.
|
SimpleContextMap |
withInteger(String key,
Integer value)
Add (or overwrite) a key,Integer pair to the Map.
|
SimpleContextMap |
withLong(String key,
Long value)
Add (or overwrite) a key,Long pair to the Map.
|
SimpleContextMap |
withObject(String key,
Object value)
Add (or overwrite) a key,Object pair to the Map.
|
SimpleContextMap |
withString(String key,
String value)
Add (or overwrite) a key,String pair to the Map.
|
public SimpleContextMap()
public SimpleContextMap(Map<?,?> attributesMap)
public Object getObject(String key, Object... optional)
ContextMapgetObject in interface ContextMappublic Boolean getBoolean(String key, Boolean... optional)
ContextMapgetBoolean in interface ContextMappublic Float getFloat(String key, Float... optional)
ContextMapgetFloat in interface ContextMappublic Integer getInteger(String key, Integer... optional)
ContextMapgetInteger in interface ContextMappublic Long getLong(String key, Long... optional)
ContextMapgetLong in interface ContextMappublic String getString(String key, String... optional)
ContextMapgetString in interface ContextMappublic SimpleContextMap withString(String key, String value)
ContextMapwithString in interface ContextMappublic SimpleContextMap withBoolean(String key, Boolean value)
ContextMapwithBoolean in interface ContextMappublic SimpleContextMap withLong(String key, Long value)
ContextMapwithLong in interface ContextMappublic SimpleContextMap withFloat(String key, Float value)
ContextMapwithFloat in interface ContextMappublic SimpleContextMap withInteger(String key, Integer value)
ContextMapwithInteger in interface ContextMappublic SimpleContextMap withObject(String key, Object value)
ContextMapwithObject in interface ContextMappublic Object clear(String key)
ContextMapclear in interface ContextMappublic Map<Object,Object> toMap()
ContextMaptoMap in interface ContextMapCopyright © 2010–2018. All rights reserved.