|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Boxed
org.gnu.glib.List
This object represents a doubly-linked list in the GLib system. This should only be used internally. This type should be converted into one of the Java container types prior to being passed to the application layer. Objects of this type should be freed by calling thre free() method. The data parameter that is being passed into many of the methods is the handle of a java-gnome object.
Field Summary |
Fields inherited from class org.gnu.glib.Boxed |
handle |
Constructor Summary | |
List()
Construct a List object |
|
List(Handle handle)
Contruct a List object using a given handle. |
Method Summary | |
void |
append(int data)
Append an element to the end of the list. |
Handle |
first()
Return the first element from the List. |
void |
free()
Release the resources associated with this object. |
protected static Handle |
g_list_alloc()
|
protected static Handle |
g_list_append(Handle list,
int data)
|
protected static Handle |
g_list_first(Handle list)
|
protected static void |
g_list_free(Handle list)
|
protected static Handle |
g_list_insert(Handle list,
int data,
int position)
|
protected static Handle |
g_list_last(Handle list)
|
protected static int |
g_list_length(Handle list)
|
protected static Handle |
g_list_next(Handle list)
|
protected static Handle |
g_list_prepend(Handle list,
int data)
|
protected static Handle |
g_list_previous(Handle list)
|
protected static Handle |
g_list_remove_all(Handle list,
int data)
|
protected static Handle |
g_list_remove(Handle list,
int data)
|
protected static Handle |
getData(Handle obj)
BEGINNING OF JNI CODE |
void |
insert(int data,
int position)
Insert an element at a specified location in the List. |
Handle |
last()
Return the last element from the List. |
int |
length()
Return the number of elements contained in the List. |
Handle |
next()
Return the next element in the List. |
void |
prepend(int data)
Prepend an element to the end of the list. |
Handle |
previous()
Return the previous element in the List. |
void |
remove(int data)
Remove the first instance of an element from the List. |
void |
removeAllInstances(int data)
Remove all instances of an element from the List. |
Methods inherited from class org.gnu.glib.Boxed |
equals, getHandle, hashCode, setHandle |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public List()
public List(Handle handle)
Method Detail |
public void free()
public void append(int data)
data
- The handle of the object that is being added
to the List.public void prepend(int data)
data
- The handle of the object that is being
added to the List.public void insert(int data, int position)
data
- The handle of the object that is being added
to the List.position
- The position to perform the insertion.public void remove(int data)
data
- The item to remove from the list. If two
items contain the same data only the first will be
removed.public void removeAllInstances(int data)
data
- The item to remove from the List. This
method will remove all instances of the object pointed
to by data.public int length()
public Handle first()
public Handle last()
public Handle next()
public Handle previous()
protected static final Handle getData(Handle obj)
protected static final Handle g_list_append(Handle list, int data)
protected static final Handle g_list_prepend(Handle list, int data)
protected static final Handle g_list_insert(Handle list, int data, int position)
protected static final Handle g_list_remove(Handle list, int data)
protected static final Handle g_list_remove_all(Handle list, int data)
protected static final void g_list_free(Handle list)
protected static final Handle g_list_alloc()
protected static final int g_list_length(Handle list)
protected static final Handle g_list_first(Handle list)
protected static final Handle g_list_last(Handle list)
protected static final Handle g_list_previous(Handle list)
protected static final Handle g_list_next(Handle list)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |