Class Param<T>

Type Parameters:
T - param value type
All Implemented Interfaces:
Serializable, scala.Serializable
Direct Known Subclasses:
BooleanParam, DoubleArrayArrayParam, DoubleArrayParam, DoubleParam, FloatParam, IntArrayParam, IntParam, LongParam, StringArrayParam

public class Param<T> extends Object implements scala.Serializable
A param with self-contained documentation and optionally default value. Primitive-typed param should use the specialized versions, which are more friendly to Java users.

param: parent parent object param: name param name param: doc documentation param: isValid optional validation method which indicates if a value is valid. See ParamValidators for factory methods for common validation functions.

See Also:
  • Constructor Details

  • Method Details

    • parent

      public String parent()
    • name

      public String name()
    • doc

      public String doc()
    • isValid

      public scala.Function1<T,Object> isValid()
    • w

      public ParamPair<T> w(T value)
      Creates a param pair with the given value (for Java).
    • jsonEncode

      public String jsonEncode(T value)
      Encodes a param value into JSON, which can be decoded by `jsonDecode()`.
    • jsonDecode

      public T jsonDecode(String json)
      Decodes a param value from JSON.
    • toString

      public final String toString()
      toString in class Object
    • hashCode

      public final int hashCode()
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      equals in class Object