Class DBusByte

java.lang.Object
java.lang.Number
com.lucimber.dbus.type.DBusByte
All Implemented Interfaces:
DBusBasicType, DBusType, Serializable, Comparable<DBusByte>

public final class DBusByte extends Number implements Comparable<DBusByte>, DBusBasicType
Maps a Byte to its D-Bus equivalent of BYTE.
See Also:
  • Method Details

    • valueOf

      public static DBusByte valueOf(byte value)
      Constructs a new D-Bus byte from its Java counterpart.
      Parameters:
      value - the byte value
      Returns:
      a new instance
    • getType

      public Type getType()
      Description copied from interface: DBusType
      Gets the type of this implementation.
      Specified by:
      getType in interface DBusType
      Returns:
      a Type
    • getDelegate

      public Byte getDelegate()
      Description copied from interface: DBusBasicType
      Gets the wrapped value of this basic type. The D-Bus type system is made of ASCII characters representing the value's type. Each D-Bus data type is mapped in this framework by its corresponding class. This method enables the access to the Java's data type - the delegate. If this basic type is for example a DBusBoolean, the returned object will be a Boolean.
      Specified by:
      getDelegate in interface DBusBasicType
      Returns:
      an Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • intValue

      public int intValue()
      Specified by:
      intValue in class Number
    • longValue

      public long longValue()
      Specified by:
      longValue in class Number
    • floatValue

      public float floatValue()
      Specified by:
      floatValue in class Number
    • doubleValue

      public double doubleValue()
      Specified by:
      doubleValue in class Number
    • compareTo

      public int compareTo(DBusByte o)
      Specified by:
      compareTo in interface Comparable<DBusByte>