Class DBusVariant

java.lang.Object
com.lucimber.dbus.type.DBusVariant
All Implemented Interfaces:
DBusContainerType, DBusType

public final class DBusVariant extends Object implements DBusContainerType
Variants may contain a value of any type. The marshalled value of the variant includes the D-Bus signature defining the type of data it contains.
See Also:
  • Method Details

    • valueOf

      public static DBusVariant valueOf(DBusType value)
    • 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 DBusType getDelegate()
      Description copied from interface: DBusContainerType
      Gets the wrapped value of this container 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 container is for example a DBusArray, the returned object will be a List.
      Specified by:
      getDelegate in interface DBusContainerType
      Returns:
      an Object
    • getSignature

      public DBusSignature getSignature()
      Description copied from interface: DBusContainerType
      Gets the signature of this container type. The returned signature describes the container and its content.
      Specified by:
      getSignature in interface DBusContainerType
      Returns:
      a DBusSignature
    • 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