Package com.gengoai
Class ParameterDef<T>
- java.lang.Object
-
- com.gengoai.ParameterDef<T>
-
- Type Parameters:
T
- the type of the parameter
- All Implemented Interfaces:
Serializable
public final class ParameterDef<T> extends Object implements Serializable
Defines a parameter and its type for use with in aParamMap
- Author:
- David B. Bracewell
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ParameterDef<Boolean>
boolParam(String name)
Creates a boolean paramstatic ParameterDef<Double>
doubleParam(String name)
Creates a Double param param.static ParameterDef<Float>
floatParam(String name)
Creates a Float param param.static ParameterDef<Integer>
intParam(String name)
Creates a Int param param.static ParameterDef<Long>
longParam(String name)
Creates a Long param param.static <T> ParameterDef<T>
param(String name, @NonNull Class<T> type)
Param parameter def.static <T> ParameterDef<T>
param(String name, @NonNull Type type)
Param parameter def.static ParameterDef<String>
strParam(String name)
Creates a String param param.
-
-
-
Method Detail
-
boolParam
public static ParameterDef<Boolean> boolParam(String name)
Creates a boolean param- Parameters:
name
- the name of the param- Returns:
- the param
-
doubleParam
public static ParameterDef<Double> doubleParam(String name)
Creates a Double param param.- Parameters:
name
- the name of the param- Returns:
- the param
-
floatParam
public static ParameterDef<Float> floatParam(String name)
Creates a Float param param.- Parameters:
name
- the name of the param- Returns:
- the param
-
intParam
public static ParameterDef<Integer> intParam(String name)
Creates a Int param param.- Parameters:
name
- the name of the param- Returns:
- the param
-
longParam
public static ParameterDef<Long> longParam(String name)
Creates a Long param param.- Parameters:
name
- the name of the param- Returns:
- the param
-
param
public static <T> ParameterDef<T> param(String name, @NonNull @NonNull Type type)
Param parameter def.- Type Parameters:
T
- the type parameter- Parameters:
name
- the nametype
- the type- Returns:
- the parameter def
-
param
public static <T> ParameterDef<T> param(String name, @NonNull @NonNull Class<T> type)
Param parameter def.- Type Parameters:
T
- the type parameter- Parameters:
name
- the nametype
- the type- Returns:
- the parameter def
-
strParam
public static ParameterDef<String> strParam(String name)
Creates a String param param.- Parameters:
name
- the name of the param- Returns:
- the param
-
-