public class CharDecoder extends Object implements Decoder
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
CharDecoder(int fieldsPerLine,
int extraSpaceAfterEvery)
Construct a new CharDecoder.
|
Modifier and Type | Method and Description |
---|---|
boolean |
append(int address,
byte theByte)
Decode one (more) byte.
|
int |
getMaximumWidth()
Retrieve the maximum width (in characters) of results that this Decoder can return (all shorter results will be padded to
this width with spaces, unless this is the last active Decoder).
|
String |
getResult()
Retrieve the current result of this Decoder.
|
boolean |
ignoreForIdenticalOutputCheck()
If the result of this Decoder should not be used to compare output lines for suppressing identical lines, this method
should return true; otherwise it should return false;
|
String |
toString() |
public CharDecoder(int fieldsPerLine, int extraSpaceAfterEvery)
fieldsPerLine
- int; maximum number of fields on one output lineextraSpaceAfterEvery
- int; insert an extra space after every N fieldspublic String getResult()
public int getMaximumWidth()
getMaximumWidth
in interface Decoder
public boolean append(int address, byte theByte) throws IOException
append
in interface Decoder
address
- int; the address that corresponds with the bytetheByte
- byte; the byteIOException
- when the output device throws this exceptionpublic boolean ignoreForIdenticalOutputCheck()
ignoreForIdenticalOutputCheck
in interface Decoder
Copyright © 2018–2019 Delft University of Technology. All rights reserved.