public class ModelParameters extends Object implements SelfWrapper
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
ModelParameters(TByteBuffer payload)
Construct ModelParameters from a IMB ByteBuffer
|
Modifier and Type | Method and Description |
---|---|
boolean |
addParameter(Parameter parameter)
Add a parameter.
|
Parameter |
getParameterByName(String name)
Retrieve the parameter with a specified name
|
List<String> |
getParameterNames()
Retrieve the names of all stored parameters.
|
Parameter.ParameterType |
getParameterType(String name)
Retrieve the type of a parameter.
|
Object |
getParameterValue(String name)
Retrieve the value of a parameter.
|
boolean |
parameterExists(String name)
Report if this ModelParameters object contains a parameter with the specified name.
|
void |
prepare(TByteBuffer payload)
Perform the prepare operation.
|
void |
qWrite(TByteBuffer payload)
Perform the qWrite operation.
|
String |
toString() |
public ModelParameters(TByteBuffer payload) throws IMBException
payload
- IMBException
public Parameter getParameterByName(String name)
name
- String; name of the parameter to look uppublic List<String> getParameterNames()
public boolean parameterExists(String name)
name
- String; name of the parameterpublic Parameter.ParameterType getParameterType(String name) throws IMBException
name
- String; name of the parameterIMBException
- when no parameter with the specified name exists in this ModelParameters objectpublic Object getParameterValue(String name) throws IMBException
name
- String; name of the parameterIMBException
- when no parameter with the specified name exists in this ModelParameters objectpublic boolean addParameter(Parameter parameter)
parameter
- Parameterpublic void prepare(TByteBuffer payload)
prepare
in interface SelfWrapper
payload
- TByteBuffer; the buffer to prepare for reception of the object that implements this interfacepublic void qWrite(TByteBuffer payload)
qWrite
in interface SelfWrapper
payload
- TByteBuffer; the buffer on which to apply the qWrite operationCopyright © 2014–2016 Delft University of Technology. All rights reserved.