public class ConstantPool extends Object
| Constructor and Description |
|---|
ConstantPool() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
get(String key)
Gets the constant with a given key.
|
boolean |
has(String key)
Checks whether this constant pool contains a value for the given key.
|
void |
importFromJson(elemental.json.JsonObject json)
Imports new constants into this pool.
|
public void importFromJson(elemental.json.JsonObject json)
json - a JSON object mapping constant keys to constant values, not
nullpublic boolean has(String key)
key - the key to check, not nulltrue if there is a constant for the given key;
otherwise falsepublic <T> T get(String key)
T - the constant typekey - the key to get a constant for, not nullnull if there is no constant
with the given keyCopyright © 2000–2022 Vaadin Ltd. All rights reserved.