append
public void append(int data)
Append an element to the end of the list.
data
- The handle of the object that is being added to the List.
first
public Handle first()
Return the first element from the List. This method will also reposition
the current list item to the beginning of the list.
- The first element from the List.
free
public void free()
Release the resources associated with this object.
g_list_alloc
protected static final Handle g_list_alloc()
g_list_append
protected static final Handle g_list_append(Handle list,
long data)
g_list_first
protected static final Handle g_list_first(Handle list)
g_list_free
protected static final void g_list_free(Handle list)
g_list_insert
protected static final Handle g_list_insert(Handle list,
long data,
int position)
g_list_last
protected static final Handle g_list_last(Handle list)
g_list_length
protected static final int g_list_length(Handle list)
g_list_next
protected static final Handle g_list_next(Handle list)
g_list_prepend
protected static final Handle g_list_prepend(Handle list,
long data)
g_list_previous
protected static final Handle g_list_previous(Handle list)
g_list_remove
protected static final Handle g_list_remove(Handle list,
long data)
g_list_remove_all
protected static final Handle g_list_remove_all(Handle list,
long data)
getData
protected static final Handle getData(Handle obj)
BEGINNING OF JNI CODE
insert
public void insert(int data,
int position)
Insert an element at a specified location in the List.
data
- The handle of the object that is being added to the List.position
- The position to perform the insertion.
last
public Handle last()
Return the last element from the List. This method will also reposition
the current list item to the end of the list.
- The last element from the List.
length
public int length()
Return the number of elements contained in the List.
- The number of elements in the List.
next
public Handle next()
Return the next element in the List. This method will also move the
current list item forward one element.
- The next element from the List.
prepend
public void prepend(int data)
Prepend an element to the end of the list.
data
- The handle of the object that is being added to the List.
previous
public Handle previous()
Return the previous element in the List. This method will also move the
current list item backward one element.
- The previous element from the List.
remove
public void remove(int data)
Remove the first instance of an element from the List.
data
- The item to remove from the list. If two items contain the
same data only the first will be removed.
removeAllInstances
public void removeAllInstances(int data)
Remove all instances of an element from the List.
data
- The item to remove from the List. This method will remove all
instances of the object pointed to by data.