Package org.kie.api.fluent
Class Variable<T>
- java.lang.Object
-
- org.kie.api.fluent.Variable<T>
-
- Type Parameters:
T
- data type of the variable
public class Variable<T> extends Object
Builder pattern like class used to build a variable.
A variable requires a name and a data type.
Value and metadata are optional.
Usage:Variable.var("test",String.class) .value("example value") .metadata("readOnly",true). .metadata("required",false)
- See Also:
NodeContainerBuilder.variable(Variable)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
getMetadata()
String
getName()
Class<T>
getType()
T
getValue()
Variable<T>
metadata(String key, Object value)
String
toString()
Variable<T>
value(T value)
static <T> Variable<T>
var(String name, Class<T> type)
-