Class NameAndStream
- java.lang.Object
 - 
- org.opentrafficsim.trafficcontrol.trafcod.NameAndStream
 
 
- 
class NameAndStream extends Object
Store a variable name, stream, isTimer, isNegated and number characters consumed information. 
- 
- 
Constructor Summary
Constructors Constructor Description NameAndStream(String text, String locationDescription)Parse a TrafCOD identifier and extract all required information. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()Retrieve the name.intgetNumberOfChars()Retrieve the number of characters consumed from the input.shortgetStream()Retrieve the stream number.booleanisNegated()Was a negation operator ('N') embedded in the name?StringtoString() 
 - 
 
- 
- 
Constructor Detail
- 
NameAndStream
NameAndStream(String text, String locationDescription) throws TrafficControlException
Parse a TrafCOD identifier and extract all required information.- Parameters:
 text- String; the TrafCOD identifier (may be followed by more text)locationDescription- String; description of the location in the input file- Throws:
 TrafficControlException- when text is not a valid TrafCOD variable name
 
 - 
 
- 
Method Detail
- 
isNegated
public boolean isNegated()
Was a negation operator ('N') embedded in the name?- Returns:
 - boolean
 
 
- 
getStream
public short getStream()
Retrieve the stream number.- Returns:
 - short; the stream number
 
 
- 
getName
public String getName()
Retrieve the name.- Returns:
 - String; the name (without the stream number)
 
 
- 
getNumberOfChars
public int getNumberOfChars()
Retrieve the number of characters consumed from the input.- Returns:
 - int; the number of characters consumed from the input
 
 
 - 
 
 -