class Variable 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 | Field and Description |
|---|---|
(package private) String |
endSource
Source of end rule.
|
(package private) EnumSet<Flags> |
flags
Flags.
|
(package private) char |
listPos
Position in the debugging list.
|
(package private) String |
name
Name of this variable (without the traffic stream).
|
(package private) int |
newColor
Output color (if this is an export variable).
|
(package private) int |
refCount
Number of rules that refer to this variable.
|
(package private) String |
startSource
Source of start rule.
|
(package private) short |
stream
Traffic stream number
|
(package private) int |
timerMax10
Limit value (if this is a timer variable).
|
(package private) int |
updateTime10
Time of last update in tenth of second.
|
(package private) int |
value
The current value.
|
| Constructor and Description |
|---|
Variable(String name,
short stream)
Construct a new Variable.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getEndSource()
Describe the rule that ends this variable.
|
String |
getStartSource()
Describe the rule that starts this variable.
|
short |
getStream()
Retrieve the stream to which this variable belongs.
|
String |
selectedFieldsToString(EnumSet<PrintFlags> printFlags)
Print selected fields.
|
void |
setEndSource(String endSource)
Set the description of the rule that ends this variable.
|
void |
setOutput(int outputValue)
Make this variable an output variable and set the output value.
|
void |
setStartSource(String startSource)
Set the description of the rule that starts this variable.
|
void |
setTimerMax(int value10)
Set the maximum time of this timer.
|
String |
toString() |
int value
int timerMax10
int newColor
final String name
char listPos
final short stream
int refCount
int updateTime10
String startSource
String endSource
public Variable(String name, short stream)
name - String; name of the new variable (without the stream number)stream - short; stream number to which the new Variable is associatedpublic void setOutput(int outputValue)
outputValue - int; the output valuepublic void setTimerMax(int value10)
throws Exception
value10 - int; the maximum time in 0.1 sException - when this Variable is not a timerpublic String getStartSource()
public void setStartSource(String startSource)
startSource - String; description of the rule that starts this variablepublic String getEndSource()
public void setEndSource(String endSource)
endSource - String; description of the rule that ends this variablepublic short getStream()
public String selectedFieldsToString(EnumSet<PrintFlags> printFlags)
printFlags - EnumSet<PrintFlags>; the set of fields to printCopyright © 2014–2016 Delft University of Technology. All rights reserved.