|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ptolemy.data.expr.Constants
public class Constants
A table of named constants that are recognized by the expression parser.
A named constant in an expression is substituted by its associated value when the expression is evaluated. The constants are stored in a hash table, using their names as key. The value of each constant is wrapped in a data token.
PtParser
Red (liuxj) |
Red (liuxj) |
Field Summary | |
---|---|
private static java.util.Hashtable |
_table
|
private static java.util.TreeMap |
_types
The treemap containing the named constants. |
Constructor Summary | |
---|---|
private |
Constants()
|
Method Summary | |
---|---|
private static void |
_putProperty(java.lang.String variableName,
java.lang.String property)
|
static void |
add(java.lang.String name,
Token value)
Add a constant with the given name and value to the table. |
static RecordToken |
constants()
Return a record representation of the constants. |
static Token |
get(java.lang.String name)
Look up the value of the constant with the given name. |
static void |
remove(java.lang.String name)
Remove the constant with the given name from the table. |
static java.util.TreeMap |
types()
Return a copy of the types. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.util.Hashtable _table
private static java.util.TreeMap _types
Constructor Detail |
---|
private Constants()
Method Detail |
---|
public static void add(java.lang.String name, Token value)
name
- The name of the constant.value
- The value of the constant, wrapped in a data token.public static RecordToken constants()
public static Token get(java.lang.String name)
name
- The name of the constant.
public static void remove(java.lang.String name)
name
- The name of the constant to be removed from the table.public static java.util.TreeMap types()
private static void _putProperty(java.lang.String variableName, java.lang.String property)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |