Package adams.flow.core
Class AdditionalOptionsHandlerUtils
- java.lang.Object
-
- adams.flow.core.AdditionalOptionsHandlerUtils
-
public class AdditionalOptionsHandlerUtils extends Object
Utility methods for classes implementing the AdditionalOptionsHandler interface.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
AdditionalOptionsHandler
-
-
Constructor Summary
Constructors Constructor Description AdditionalOptionsHandlerUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AdditionalOptions
breakUpOptions(String optStr, Variables vars)
Breaks up the option string ("key=value [key=value ...]") into key value pairs and returns them in a hashtable.static boolean
setOptions(Object obj, String optStr, Variables vars)
Sets the (additional) options, if the provided object implements the AdditionalOptionsHandler interface.
-
-
-
Method Detail
-
breakUpOptions
public static AdditionalOptions breakUpOptions(String optStr, Variables vars) throws Exception
Breaks up the option string ("key=value [key=value ...]") into key value pairs and returns them in a hashtable.- Parameters:
optStr
- the option stringvars
- the variables to expand- Returns:
- the generated key=value relation
- Throws:
Exception
- if parsing of the options fails
-
setOptions
public static boolean setOptions(Object obj, String optStr, Variables vars) throws Exception
Sets the (additional) options, if the provided object implements the AdditionalOptionsHandler interface.- Parameters:
obj
- the object to set the options foroptStr
- the options string to parse and then setvars
- the variables to expand- Returns:
- true if options could be set
- Throws:
Exception
- if parsing of the options failed- See Also:
AdditionalOptionsHandler
-
-