public class Variant<T>
extends java.lang.Object
| Constructor and Description |
|---|
Variant(T o)
Create a Variant from a basic type object.
|
Variant(T o,
java.lang.String sig)
Create a Variant.
|
Variant(T o,
java.lang.reflect.Type type)
Create a Variant.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other)
Compare this Variant with another by comparing contents
|
java.lang.String |
getSig()
Return the dbus signature of the wrapped value.
|
java.lang.reflect.Type |
getType()
Return the type of the wrapped value.
|
T |
getValue()
Return the wrapped value.
|
java.lang.String |
toString()
Format the Variant as a string.
|
public Variant(T o) throws java.lang.IllegalArgumentException
o - The wrapped value.IllegalArugmentException - If you try and wrap Null or an object of a non-basic type.java.lang.IllegalArgumentExceptionpublic Variant(T o, java.lang.reflect.Type type) throws java.lang.IllegalArgumentException
o - The wrapped value.type - The explicit type of the value.IllegalArugmentException - If you try and wrap Null or an object which cannot be sent over DBus.java.lang.IllegalArgumentExceptionpublic Variant(T o, java.lang.String sig) throws java.lang.IllegalArgumentException
o - The wrapped value.sig - The explicit type of the value, as a dbus type string.IllegalArugmentException - If you try and wrap Null or an object which cannot be sent over DBus.java.lang.IllegalArgumentExceptionpublic T getValue()
public java.lang.reflect.Type getType()
public java.lang.String getSig()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Object