com.taco.text
Class GlobalUtilities

java.lang.Object
  extended by com.taco.text.GlobalUtilities

public class GlobalUtilities
extends java.lang.Object

A static utility class used to retrieve and set global variables in an argument map during an interpolating conversion process.


Field Summary
static java.lang.String GLOBALS_KEY
          The key used to reference the map of global variables to their values inside the argument map.
 
Constructor Summary
protected GlobalUtilities()
          Since this class is a static utility class, its sole constructor is protected.
 
Method Summary
static java.lang.Object getGlobal(java.lang.String globalName, INoReturnMap argMap)
          Return the value in the global variable map associated with the argument name.
static boolean isGlobalDefined(java.lang.String globalName, INoReturnMap argMap)
          Return true if the argument map has a global variable with the argument name defined.
static boolean putGlobal(java.lang.String globalName, java.lang.Object value, INoReturnMap argMap)
          Attempt to set the value of the global variable with name globalName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GLOBALS_KEY

public static final java.lang.String GLOBALS_KEY
The key used to reference the map of global variables to their values inside the argument map.

See Also:
Constant Field Values
Constructor Detail

GlobalUtilities

protected GlobalUtilities()
Since this class is a static utility class, its sole constructor is protected.

Method Detail

isGlobalDefined

public static boolean isGlobalDefined(java.lang.String globalName,
                                      INoReturnMap argMap)
Return true if the argument map has a global variable with the argument name defined. This may used to distinguish a null value mapped to a global variable name and the lack of any value mapped to a global variable name. If the argument map is null, return null.


getGlobal

public static java.lang.Object getGlobal(java.lang.String globalName,
                                         INoReturnMap argMap)
Return the value in the global variable map associated with the argument name. If the argument map is null, no global map exists, or no value is associated with the variable name, return null.


putGlobal

public static boolean putGlobal(java.lang.String globalName,
                                java.lang.Object value,
                                INoReturnMap argMap)
Attempt to set the value of the global variable with name globalName. This process may entail creating the global variable map and putting in the argument map. Return true if successful. If the argument map is null or a non-Map is mapped to GLOBAL_KEY, return false.