public abstract class AbstractConfig extends CombinableConfig
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractConfig()
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
all() |
<T> boolean |
contains(IKey<T> key)
returns true if given key is set to this config
|
<T> T |
get(IKey<T> key)
returns the value for the given key.
|
protected <T> String |
getString(IKey<T> key)
returns the value as string according to given key.
|
boolean |
isEmpty() |
protected static <T> IKey<T> |
newKey(String key,
T defaultValue)
creates a new key.
|
<T> AbstractConfig |
put(IKey<T> key,
T value)
puts a new config to the configuration map.
|
<T> T |
remove(IKey<T> key)
removes the given key (and its value) from configuration map.
|
String |
toJsonString() |
protected ConfigModel |
wrap(org.apache.wicket.model.IModel<String> model)
Wraps IModel<String> in ConfigModel to serialize it as
simple String in the produced JSON.
|
combine, withFallbackpublic final String toJsonString()
public final boolean isEmpty()
public final <T> AbstractConfig put(IKey<T> key, T value)
IKey implementation.key - mandatory parametervalue - mandatory parameterpublic <T> boolean contains(IKey<T> key)
Configkey - The key to check.public final <T> T remove(IKey<T> key)
key - the key to removeprotected final <T> String getString(IKey<T> key)
key - The key to read.public final <T> T get(IKey<T> key)
key - The key to read.protected ConfigModel wrap(org.apache.wicket.model.IModel<String> model)
model - The model to wrap.Copyright © 2014. All Rights Reserved.