org.gnu.glib
public class Boxed extends Struct
| Method Summary | |
|---|---|
| boolean | equals(Object other)
Check if two objects refer to the same (native) object.
|
| static Boxed | getBoxedFromHandle(Handle hndl)
Gets a Boxed instance for the given Handle. |
| int | hashCode()
Returns a hash code value for the object. |
Parameters: other the reference object with which to compare.
Returns: true if both objects refer to the same object.
// Get a Handle from somewhere (typically as a parameter to a method
// used as a callback and invoked from the C JNI side).
SomeGtkClass finalobj = null;
Boxed obj = Boxed.getBoxedFromHandle(handle);
if (obj == null) {
finalobj = new SomeGtkClass(handle);
} else {
finalobj = (SomeGtkClass) obj;
}
NOTE: This is for internal use only and should never need to be used in
application code.Returns: a hash code value for the object.