net.sf.jpkgmk.util
Class VariableMap
java.lang.Object
net.sf.jpkgmk.util.VariableMap
- All Implemented Interfaces:
- VariableResolver
public class VariableMap
- extends java.lang.Object
- implements VariableResolver
A variable map that holds key value pairs whereas the key is regarded as variable name.
- Since:
- 1.0
- Version:
- $Revision: 2 $ $Date: 2008-08-20 21:14:19 +0200 (Mi, 20 Aug 2008) $
- Author:
- gommma (gommma AT users.sourceforge.net), Last changed by: $Author: gommma $
Constructor Summary |
VariableMap()
Creates a new, empty variable map |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VariableMap
public VariableMap()
- Creates a new, empty variable map
expand
public java.lang.String expand(java.lang.String evaluationString)
- Description copied from interface:
VariableResolver
- Expands all variables within the given string and returns the evaluated result as string
- Specified by:
expand
in interface VariableResolver
- Returns:
- See Also:
VariableResolver.expand(java.lang.String)
size
public int size()
- Returns:
- Returns the current size of this variable map. Effectively the number of variables stored in this map.
registerInVariablesMap
public void registerInVariablesMap(PrototypeEntry entry)
unregisterFromVariablesMap
public void unregisterFromVariablesMap(PrototypeEntry entry)
addVariable
public void addVariable(java.lang.String key,
java.lang.String value)
getVariableValue
public java.lang.String getVariableValue(java.lang.String variableName)
- Parameters:
variableName
-
- Returns:
- Returns the unexpanded value of the given variable name
getVariableValue
public java.lang.String getVariableValue(java.lang.String variableName,
boolean expandVariable)
containsVariable
public static boolean containsVariable(java.lang.String stringToCheck)
Copyright © 2007-2008. All Rights Reserved.