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