public class DMXLocalModel extends Object
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
get()
Gets all data registered with this local model.
|
Object |
get(String id)
Returns value of data with given ID.
|
<T> T |
get(String id,
Class<T> clazz)
Returns value of data with given ID as type of specified class.
|
<T> T |
get(String id,
Class<T> clazz,
T defaultValue)
Returns value of data with given ID as type of specified class.
|
static DMXLocalModel |
instance() |
DMXLocalModel |
set(Map<String,Object> data)
Set data map to this local model.
|
DMXLocalModel |
set(String id,
Object value)
Adds data to the local model.
|
public static DMXLocalModel instance()
public DMXLocalModel set(String id, Object value)
id
- data IDvalue
- data valuepublic DMXLocalModel set(Map<String,Object> data)
data
- data map to setDMXLocalModel
instancepublic Map<String,Object> get()
public Object get(String id)
id
- data IDpublic <T> T get(String id, Class<T> clazz)
null
T
- return typeid
- data IDclazz
- data classnull
if does not exist in this local modelpublic <T> T get(String id, Class<T> clazz, T defaultValue)
T
- required data typeid
- data IDclazz
- data classdefaultValue
- default value to return if variable with given ID does not existCopyright © 2012-2014 Vektor Software. All Rights Reserved.