Package com.gengoai

Class 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 a ParamMap
    Author:
    David B. Bracewell
    See Also:
    Serialized Form
    • Field Detail

      • name

        public final String name
        The Param name.
      • type

        public final Class<T> type
        The Param Type.
    • 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 name
        type - 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 name
        type - 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