Package jline.lang.processes
Class Process
-
- All Implemented Interfaces:
-
java.io.Serializable
public abstract class Process implements Serializable
An abstract class for stochastic processes
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringnameprotected List<NamedParam>params
-
Method Summary
Modifier and Type Method Description abstract Objectsample()Sample a value from the process StringgetName()Get the name of this process intgetNumParams()Get the number of parameters voidsetParam(int id, String paramName, Object paramValue)Set a parameter by id, name and value NamedParamgetParam(int id)Get a parameter by id Stringname()Kotlin-style property alias for getName() intnumParams()Kotlin-style property alias for getNumParams() NamedParamparam(int id)Kotlin-style property alias for getParam(int id) -
-
Constructor Detail
-
Process
Process(String name, int numParam)
Creates a new process with the specified name and number of parameters.- Parameters:
name- the name of this process typenumParam- the number of parameters required
-
-
Method Detail
-
getNumParams
int getNumParams()
Get the number of parameters
- Returns:
number of parameters
-
setParam
void setParam(int id, String paramName, Object paramValue)
Set a parameter by id, name and value
- Parameters:
id- parameter index (1-based)paramName- parameter nameparamValue- parameter value
-
getParam
NamedParam getParam(int id)
Get a parameter by id
- Parameters:
id- parameter index (1-based)- Returns:
the named parameter
-
numParams
int numParams()
Kotlin-style property alias for getNumParams()
-
param
NamedParam param(int id)
Kotlin-style property alias for getParam(int id)
-
-
-
-