public class FixedString 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 |
---|
FixedString(String fixedResult)
Construct a Decoder that returns a fixed result in the
getResult method. |
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 FixedString(String fixedResult)
getResult
method.fixedResult
- String; the String that the getResult
method will return on each invocationpublic String getResult()
public int getMaximumWidth()
getMaximumWidth
in interface Decoder
public boolean append(int address, byte theByte)
append
in interface Decoder
address
- int; the address that corresponds with the bytetheByte
- byte; the bytepublic boolean ignoreForIdenticalOutputCheck()
ignoreForIdenticalOutputCheck
in interface Decoder
Copyright © 2018–2019 Delft University of Technology. All rights reserved.