public class Param<T>
extends Object
implements scala.Serializable
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.
Constructor and Description |
---|
Param(Identifiable parent,
String name,
String doc) |
Param(Identifiable parent,
String name,
String doc,
scala.Function1<T,Object> isValid) |
Param(String parent,
String name,
String doc) |
Param(String parent,
String name,
String doc,
scala.Function1<T,Object> isValid) |
Modifier and Type | Method and Description |
---|---|
String |
doc() |
boolean |
equals(Object obj) |
int |
hashCode() |
scala.Function1<T,Object> |
isValid() |
T |
jsonDecode(String json)
Decodes a param value from JSON.
|
String |
jsonEncode(T value)
Encodes a param value into JSON, which can be decoded by `jsonDecode()`.
|
String |
name() |
String |
parent() |
String |
toString() |
ParamPair<T> |
w(T value)
Creates a param pair with the given value (for Java).
|
public Param(String parent, String name, String doc, scala.Function1<T,Object> isValid)
public Param(Identifiable parent, String name, String doc, scala.Function1<T,Object> isValid)
public Param(String parent, String name, String doc)
public Param(Identifiable parent, String name, String doc)
public String parent()
public String name()
public String doc()
public scala.Function1<T,Object> isValid()
public String jsonEncode(T value)
public T jsonDecode(String json)
public final String toString()
toString
in class Object
public final int hashCode()
hashCode
in class Object
public final boolean equals(Object obj)
equals
in class Object