|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object extended byptolemy.data.expr.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
| Method Summary | |
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 |
| 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||