public class SessionStore.MapSetting<T> extends SessionStore.StoreSetting<java.util.Map<java.lang.String,T>>
BaseSetting.JSONSerializable, BaseSetting.JSONSetting<T>
Constructor and Description |
---|
MapSetting(java.lang.String key,
java.lang.Class<T> clazz)
Create a new setting with the given key and null default value.
|
MapSetting(java.lang.String key,
java.util.Map<java.lang.String,T> def,
java.lang.Class<T> clazz)
Create a new setting with the given key and default value.
|
MapSetting(java.lang.String key,
java.util.Map<java.lang.String,T> def,
Serializer<T> serializer)
Create a new setting with the given key and default value.
|
Modifier and Type | Method and Description |
---|---|
T |
get(java.lang.String n) |
boolean |
putT(java.lang.String n,
T newValue) |
get, getDefault, key, reset, setRaw, toString
addListener, addListener, addValidation, addValidation, getSerializer, setT
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getSerial, read, setSerial, setSerialT, setString, setStringT, toJSONString, write
isDefault, set, test
public MapSetting(java.lang.String key, java.lang.Class<T> clazz)
key
- The key for this item in the preferencesclazz
- The class of T
public MapSetting(java.lang.String key, java.util.Map<java.lang.String,T> def, java.lang.Class<T> clazz)
key
- The key for this item in the preferencesdef
- The default value of the preferenceclazz
- The class of T
public MapSetting(java.lang.String key, java.util.Map<java.lang.String,T> def, Serializer<T> serializer)
key
- The key for this item in the preferencesdef
- The default value of the preferenceserializer
- A serializerpublic T get(java.lang.String n)
n
- The index to checkpublic boolean putT(java.lang.String n, T newValue) throws ProofAsstException
n
- The index to setnewValue
- the new value of this setting.ProofAsstException
- If validation fails