public class InputParameter extends Object
InputParameter
, specifying its default value, description, and potentially valid values (e.g non-negativity).
Also, the parameter type will be defined (int
, double
, String
, boolean
, ...) initializeAllInputParameterFieldsOfObject
, all the fields in the current class of the type
InputParameter
are initialized from the values from a Map<String,String>
map. The checks on the input parameter ranges are checked. Java reflection is used for this. return InputParameter.getInformationAllInputParameterFieldsOfObject(this);
inside its method getParameters
, to return
all the information of all the fields in the class of the type InputParameter
. Again, this class uses Java reflection internally. getXXX
Constructor and Description |
---|
InputParameter(String memberName,
boolean defaultValue,
String description) |
InputParameter(String memberName,
double defaultValue,
String par_description) |
InputParameter(String memberName,
double defaultValue,
String description,
double lowerLimitAcceptableValues,
boolean lowerLimitIncluded,
double upperLimitAcceptableValues,
boolean upperLimitIncluded) |
InputParameter(String memberName,
int defaultValue,
String description) |
InputParameter(String memberName,
int defaultValue,
String description,
int lowerLimitAcceptableValues,
int upperLimitAcceptableValues) |
InputParameter(String memberName,
long defaultValue,
String description) |
InputParameter(String memberName,
long defaultValue,
String description,
long lowerLimitAcceptableValues,
long upperLimitAcceptableValues) |
InputParameter(String memberName,
String defaultValue,
String description) |
public InputParameter(String memberName, double defaultValue, String par_description)
public InputParameter(String memberName, double defaultValue, String description, double lowerLimitAcceptableValues, boolean lowerLimitIncluded, double upperLimitAcceptableValues, boolean upperLimitIncluded)
public InputParameter(String memberName, int defaultValue, String description, int lowerLimitAcceptableValues, int upperLimitAcceptableValues)
public InputParameter(String memberName, long defaultValue, String description, long lowerLimitAcceptableValues, long upperLimitAcceptableValues)
public static Map<String,String> createMapFromInputParameters(InputParameter[] params)
public boolean getBoolean()
public static List<Map<String,String>> getCartesianProductOfParameters(Map<String,List<String>> paramKeyValues)
paramKeyValues
- the input param-key valuespublic static Map<String,String> getDefaultParameters(List<Triple<String,String,String>> paramDescriptions)
paramDescriptions
- param name, param default, param descriptionpublic double getDouble()
public static List<Triple<String,String,String>> getInformationAllInputParameterFieldsOfObject(Object o)
public static List<Triple<String,String,String>> getInformationAllInputParameterFieldsOfObject(Object o, String className)
public int getInt()
public Long getLong()
public String getRunnable_classname()
public String getRunnable_file()
public String getRunnable_parameters()
public String getString()
public void initialize(boolean val)
public void initialize(double val)
public void initialize(int val)
public void initialize(long val)
public void initialize(String val)
public static void initializeAllInputParameterFieldsOfObject(Object o, Map<String,String> params)
public static void initializeAllInputParameterFieldsOfObject(Object o, String className, Map<String,String> params)
public boolean isWithinAcceptableRange()
public static void main(String[] args)
Copyright © 2018. All rights reserved.