org.gnu.glib

Class Struct

public class Struct extends Object

Constructor Summary
protected Struct()
Create an uninitialized instance.
Struct(Handle handle)
Create a new Struct with a handle to a native resource returned from a call to the native libraries.
Method Summary
booleanequals(Object other)
Check if two objects refer to the same (native) object.
HandlegetHandle()
Get the raw handle value.
static HandlegetNullHandle()
Get a native handle that refers to a null pointer.
inthashCode()
Returns a hash code value for the object.
protected voidsetHandle(Handle hndl)
Sets this object's native handle.

Constructor Detail

Struct

protected Struct()
Create an uninitialized instance. This has potential uses for derived classes.

Struct

public Struct(Handle handle)
Create a new Struct with a handle to a native resource returned from a call to the native libraries.

Parameters: handle The handle that represents a pointer to a native resource.

Method Detail

equals

public boolean equals(Object other)
Check if two objects refer to the same (native) object.

Parameters: other the reference object with which to compare.

Returns: true if both objects refer to the same object.

getHandle

public final Handle getHandle()
Get the raw handle value. This value should never be modified by the application. It's sole use is to pass to native methods.

Returns: the handle value.

getNullHandle

public static final Handle getNullHandle()
Get a native handle that refers to a null pointer.

hashCode

public int hashCode()
Returns a hash code value for the object. This allows for using Struct as keys in hashmaps.

Returns: a hash code value for the object.

setHandle

protected void setHandle(Handle hndl)
Sets this object's native handle.