org.openmuc.jmbus
public class Bcd extends java.lang.Number
double
, int
or String
.Constructor and Description |
---|
Bcd(byte[] bcdBytes)
Constructs a
Bcd from the given bytes. |
Modifier and Type | Method and Description |
---|---|
double |
doubleValue()
Returns the value of this
Bcd as a double. |
float |
floatValue()
Returns the value of this
Bcd as a float. |
byte[] |
getBytes() |
int |
intValue()
Returns the value of this
Bcd as an int. |
long |
longValue()
Returns the value of this
Bcd as a long. |
java.lang.String |
toString() |
public Bcd(byte[] bcdBytes)
Bcd
from the given bytes. The constructed Bcd will use the given byte array for
internal storage of its value. It is therefore recommended not to change the byte array after construction.bcdBytes
- the byte array to be used for construction of the Bcd
public byte[] getBytes()
public java.lang.String toString()
toString
in class java.lang.Object
public double doubleValue()
Bcd
as a double.doubleValue
in class java.lang.Number
public float floatValue()
Bcd
as a float.floatValue
in class java.lang.Number
public int intValue()
Bcd
as an int.intValue
in class java.lang.Number
public long longValue()
Bcd
as a long.longValue
in class java.lang.Number