public class HexAddressDecoder 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.
Modifier and Type | Field and Description |
---|---|
(package private) String |
result
Result returned by getResult.
|
Constructor and Description |
---|
HexAddressDecoder(int roundToMultiple)
Construct a new HexAddressDecoder.
|
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() |
String result
public HexAddressDecoder(int roundToMultiple)
roundToMultiple
- int; if > 1 round addresses down to the nearest (lower) multiple of this value and the append
method will return true when the last byte before such a multiple is added.public 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.