Package com.lucimber.dbus.type
Class DBusString
java.lang.Object
com.lucimber.dbus.type.DBusString
- All Implemented Interfaces:
DBusBasicType
,DBusType
Maps a
String
to its D-Bus equivalent of STRING.-
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets the wrapped value of this basic type.getType()
Gets the type of this implementation.int
hashCode()
toString()
static DBusString
Constructs a new D-Bus string from its Java counterpart.
-
Method Details
-
valueOf
Constructs a new D-Bus string from its Java counterpart. Validates that the string is valid UTF-8 and within size limits.- Parameters:
value
- the string value- Returns:
- a new instance
- Throws:
IllegalArgumentException
- if the string is invalid
-
getType
Description copied from interface:DBusType
Gets the type of this implementation. -
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 aDBusBoolean
, the returned object will be aBoolean
.- Specified by:
getDelegate
in interfaceDBusBasicType
- Returns:
- an
Object
-
equals
-
hashCode
public int hashCode() -
toString
-