public class ConstantsDefinitions
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addConstant(java.lang.String name,
Constant constant)
Add a new global constant binding.
|
Constant |
getConstant(java.lang.String name)
Return the constant of a given name.
|
java.util.Map<java.lang.String,Constant> |
getConstants()
Return the Map of constants.
|
static ConstantsDefinitions |
getInstance()
Return the unique instance.
|
boolean |
hasConstant(java.lang.String name)
Return true if there is a constant with a specified name.
|
void |
reset()
Reset all the bindings.
|
public static ConstantsDefinitions getInstance()
public void reset()
public java.util.Map<java.lang.String,Constant> getConstants()
public boolean hasConstant(java.lang.String name)
name
- the constant namepublic Constant getConstant(java.lang.String name)
name
- the constant namepublic void addConstant(java.lang.String name, Constant constant)
name
- the constant nameconstant
- the constantCopyright © 2018 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence