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) |
Modifier and Type | Method and Description |
---|---|
static Map<String,String> |
createMapFromInputParameters(InputParameter[] params) |
boolean |
getBoolean() |
double |
getDouble() |
Triple<String,String,String> |
getInfo() |
static List<Triple<String,String,String>> |
getInformationAllInputParameterFieldsOfObject(Object o) |
static List<Triple<String,String,String>> |
getInformationAllInputParameterFieldsOfObject(Object o,
String className) |
int |
getInt() |
Long |
getLong() |
String |
getRunnable_classname() |
String |
getRunnable_file() |
String |
getRunnable_parameters() |
String |
getString() |
void |
initialize(boolean val) |
void |
initialize(double val) |
void |
initialize(int val) |
void |
initialize(long val) |
void |
initialize(String val) |
void |
initialize(String file,
String classname,
String parameters) |
static void |
initializeAllInputParameterFieldsOfObject(Object o,
Map<String,String> params) |
static void |
initializeAllInputParameterFieldsOfObject(Object o,
String className,
Map<String,String> params) |
void |
initializeFromMap(Map<String,String> map) |
boolean |
isWithinAcceptableRange() |
static void |
main(String[] args) |
String |
toString() |
public InputParameter(String memberName, boolean 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)
public InputParameter(String memberName, int defaultValue, String description, int lowerLimitAcceptableValues, int upperLimitAcceptableValues)
public InputParameter(String memberName, long defaultValue, String description)
public InputParameter(String memberName, long defaultValue, String description, long lowerLimitAcceptableValues, long upperLimitAcceptableValues)
public InputParameter(String memberName, String defaultValue, String description)
public static Map<String,String> createMapFromInputParameters(InputParameter[] params)
public boolean getBoolean()
public double getDouble()
public Triple<String,String,String> getInfo()
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 void initialize(String file, String classname, String parameters)
public static void initializeAllInputParameterFieldsOfObject(Object o, Map<String,String> params)
public static void initializeAllInputParameterFieldsOfObject(Object o, String className, Map<String,String> params)
public void initializeFromMap(Map<String,String> map)
public boolean isWithinAcceptableRange()
public static void main(String[] args)
public String toString()
toString
in class Object