|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgnu.jel.DVMap
public abstract class DVMap
Provides the information about defined dynamic variables.
Allows to translate variable names into constants of Java primitive types at compile-time. See the section of the manual on dynamic variables.
Constructor Summary | |
---|---|
DVMap()
|
Method Summary | |
---|---|
abstract java.lang.String |
getTypeName(java.lang.String name)
Returns the name of the type of the named property. |
java.lang.Object |
translate(java.lang.String name)
Translates the variable name (a String) to a constant of any primtive type (e.g. a number). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DVMap()
Method Detail |
---|
public abstract java.lang.String getTypeName(java.lang.String name)
The dot ('.') symbol can be present in the property name to denote hierarchical naming scheme.
If hierarchical naming scheme is used and the variable x.y is defined the variable x must also be defined.
name
- is the name of the property.
public java.lang.Object translate(java.lang.String name)
The performance of the compiled code can be sometimes improved by letting it not to deal with strings. For example, in older JEL <=0.9.8 this method was absent, and, if the underlying representation of the dynamic variables storage was an array, the translation of variable name (represented by String) into integer index had to happen at run-time, taking up the valuable processor cycles. Defining the proper DVMap.translate one can perform the translation "variable name(String)"->"slot number(int)" at compile time. There can be also other clever ways of using translation to improve performance even if variables are not stored in an array or vector.
The default implementation provides the identity translation, which simulates the behaviour of older versions of JEL.
name
- Name of the variable to be translated.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |