org.gnu.glib

Class Quark

public class Quark extends Object

A Quark is an association between a String and an integer identifier. Given either the String or the Quark it is possible to retrieve the other. This object is used primarily inside of the bindings. The external interface should use a standard Java type like Property.
Constructor Summary
Quark(String string)
Create a Quark object.
Quark(int handle)
This is the method that allows one to construct a Quark once a native peer has been provided.
Method Summary
static QuarkfindQuark(String string)
Find a Quark that is associated with the given string.
intgetHandle()
StringgetString()
Retrieve the string value associated with this Quark.

Constructor Detail

Quark

public Quark(String string)
Create a Quark object.

Parameters: string The string value associated with this Quark.

Quark

public Quark(int handle)
This is the method that allows one to construct a Quark once a native peer has been provided.

Parameters: handle The native peer that was returned from a call to the native libraries.

Method Detail

findQuark

public static final Quark findQuark(String string)
Find a Quark that is associated with the given string. If one is not found a null value is returned.

Parameters: string The string value to use for the search

Returns: The Quark value associated with the string or null if one is not found.

getHandle

public int getHandle()

getString

public final String getString()
Retrieve the string value associated with this Quark.

Returns: The string value