|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.freedesktop.dbus.Variant<T>
public class Variant<T>
A Wrapper class for Variant values. A method on DBus can send or receive a Variant. This will wrap another value whose type is determined at runtime. The Variant may be parameterized to restrict the types it may accept.
| Constructor Summary | |
|---|---|
Variant(T o)
Create a Variant from a basic type object. |
|
Variant(T o,
String sig)
Create a Variant. |
|
Variant(T o,
Type type)
Create a Variant. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object other)
Compare this Variant with another by comparing contents |
String |
getSig()
Return the dbus signature of the wrapped value. |
Type |
getType()
Return the type of the wrapped value. |
T |
getValue()
Return the wrapped value. |
String |
toString()
Format the Variant as a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Variant(T o)
throws IllegalArgumentException
o - The wrapped value.
IllegalArugmentException - If you try and wrap Null or an object of a non-basic type.
IllegalArgumentException
public Variant(T o,
Type type)
throws 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.
IllegalArgumentException
public Variant(T o,
String sig)
throws 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.
IllegalArgumentException| Method Detail |
|---|
public T getValue()
public Type getType()
public String getSig()
public String toString()
toString in class Objectpublic boolean equals(Object other)
equals in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||