public class Parameter extends Object
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.
Modifier and Type | Class and Description |
---|---|
static class |
Parameter.ParameterType
IMB integer numbers and our corresponding enum values.
|
(package private) class |
Parameter.PropertyIterator
Really simple iterator for properties.
|
Constructor and Description |
---|
Parameter(String name,
Boolean value)
Construct a Boolean parameter.
|
Parameter(String name,
double value)
Construct a new float parameter.
|
Parameter(String name,
int value)
Construct a new integer parameter.
|
Parameter(String name,
String value)
Construct a String parameter.
|
Parameter(TByteBuffer payload)
Construct a new Parameter from the next object in a TByteBuffer.
|
Modifier and Type | Method and Description |
---|---|
String |
getName() |
Parameter.ParameterType |
getType() |
Object |
getValue() |
List<String> |
getValueList() |
void |
prepare(TByteBuffer payload)
Prepare this parameter for transmission over IMB.
|
void |
qWrite(TByteBuffer payload)
Prepare this parameter for transmission over IMB.
|
void |
setValueList(List<String> list)
Set the list of pre-defined options that the user may choose from.
|
String |
toString() |
public Parameter(String name, double value)
name
- String; name of the new float parametervalue
- double; value of the new float parameterpublic Parameter(String name, Boolean value)
name
- String; the name of the new Boolean parametervalue
- String; the value of the new Boolean parameterpublic Parameter(String name, int value)
name
- String; name of the new integer parametervalue
- double; value of the new integer parameterpublic Parameter(String name, String value)
name
- String; the name of the new String parametervalue
- String; the value of the new String parameterpublic Parameter(TByteBuffer payload) throws IMBException
payload
- TByteBuffer; the received IMB dataIMBException
- when the received type cannot be converted to a Parameter sub-typepublic void prepare(TByteBuffer payload)
payload
- TByteBuffer; the transmission bufferpublic void qWrite(TByteBuffer payload)
payload
- TByteBuffer; the transmission bufferpublic void setValueList(List<String> list)
list
- List<String>; the list of optionspublic String getName()
public Object getValue()
public Parameter.ParameterType getType()
Copyright © 2014–2016 Delft University of Technology. All rights reserved.