Class Quark
A GQuark value of zero is associated to NULL.
Given either the string or the GQuark identifier it is possible to
retrieve the other.
Quarks are used for both datasets and keyed data lists.
To create a new quark from a string, use GLib.quarkFromString(java.lang.String)
or GLib.quarkFromStaticString(java.lang.String).
To find the string corresponding to a given GQuark, use
GLib.quarkToString(org.gnome.glib.Quark).
To find the GQuark corresponding to a given string, use
GLib.quarkTryString(java.lang.String).
Another use for the string pool maintained for the quark functions
is string interning, using GLib.internString(java.lang.String) or
GLib.internStaticString(java.lang.String). An interned string is a canonical
representation for a string. One important advantage of interned
strings is that they can be compared for equality by a simple
pointer comparison, rather than using strcmp().
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Quark[]fromNativeArray(MemorySegment address, long length, TransferOwnership transfer) Methods inherited from class org.javagi.base.Alias
equals, getAddressValues, getBooleanValues, getByteValues, getCharacterValues, getDoubleValues, getFloatValues, getIntegerValues, getLongValues, getShortValues, getValue, hashCode, setValue, toString
-
Constructor Details
-
Quark
public Quark(int value) Create a new Quark with the provided value
-
-
Method Details
-
fromNativeArray
public static Quark[] fromNativeArray(MemorySegment address, long length, TransferOwnership transfer)
-