org.makumba.commons
Class ArgumentReplacer
java.lang.Object
org.makumba.commons.ArgumentReplacer
public class ArgumentReplacer
- extends Object
Parses a string and identifies the arguments, to allow operations with them for now, arguments are of the form
$javaid[$] but the class can be extended for them to take other forms
- Version:
- $Id: ArgumentReplacer.java 3090 2008-08-16 12:39:58Z cristian_bogdan $
- Author:
- Cristian Bogdan
|
Constructor Summary |
ArgumentReplacer(String s,
boolean acceptColon)
Makes a list of all arguments and where they are |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
text
List<String> text
argumentNames
Map<String,String> argumentNames
argumentOrder
List<String> argumentOrder
ArgumentReplacer
public ArgumentReplacer(String s,
boolean acceptColon)
- Makes a list of all arguments and where they are
- Parameters:
s - the string containing the argumentsacceptColon -
getArgumentNames
public Iterator<String> getArgumentNames()
- Gets the arguments list
- Returns:
- An Enumeration containing the list of arguments
replaceValues
public String replaceValues(Map<String,Object> d)
- Replaces the arguments in a dictionary by their equivalent in numbers
- Parameters:
d - the dictionary containing the arguments in their original form
- Returns:
- A String with the respective values replaced