#include <axis2_linked_list.h>
Public Attributes | |
axis2_status_t(* | free )(axis2_linked_list_t *linked_list, const axis2_env_t *env) |
entry_t *(* | get_entry )(axis2_linked_list_t *linked_list, const axis2_env_t *env, int n) |
axis2_status_t(* | remove_entry )(axis2_linked_list_t *linked_list, const axis2_env_t *env, entry_t *e) |
axis2_bool_t(* | check_bounds_inclusive )(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index) |
axis2_bool_t(* | check_bounds_exclusive )(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index) |
void *(* | get_first )(axis2_linked_list_t *linked_list, const axis2_env_t *env) |
void *(* | get_last )(axis2_linked_list_t *linked_list, const axis2_env_t *env) |
void *(* | remove_first )(axis2_linked_list_t *linked_list, const axis2_env_t *env) |
void *(* | remove_last )(axis2_linked_list_t *linked_list, const axis2_env_t *env) |
axis2_status_t(* | add_first )(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o) |
axis2_status_t(* | add_last )(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o) |
axis2_bool_t(* | contains )(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o) |
int(* | size )(axis2_linked_list_t *linked_list, const axis2_env_t *env) |
axis2_bool_t(* | add )(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o) |
axis2_bool_t(* | remove )(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o) |
axis2_status_t(* | clear )(axis2_linked_list_t *linked_list, const axis2_env_t *env) |
void *(* | get )(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index) |
void *(* | set )(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index, void *o) |
axis2_status_t(* | add_at_index )(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index, void *o) |
void *(* | remove_at_index )(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index) |
int(* | index_of )(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o) |
int(* | last_index_of )(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o) |
void **(* | to_array )(axis2_linked_list_t *linked_list, const axis2_env_t *env) |
axis2_bool_t( * axis2_linked_list_ops_s::add)(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o) |
Adds an element to the end of the list.
e | the entry to add |
axis2_status_t( * axis2_linked_list_ops_s::add_at_index)(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index, void *o) |
Inserts an element in the given position in the list.
index | where to insert the element | |
o | the element to insert |
axis2_status_t( * axis2_linked_list_ops_s::add_first)(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o) |
Insert an element at the first of the list.
o | the element to insert |
axis2_status_t( * axis2_linked_list_ops_s::add_last)(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o) |
Insert an element at the last of the list.
o | the element to insert |
axis2_bool_t( * axis2_linked_list_ops_s::check_bounds_exclusive)(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index) |
Checks that the index is in the range of existing elements (exclusive).
index | the index to check |
axis2_bool_t( * axis2_linked_list_ops_s::check_bounds_inclusive)(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index) |
Checks that the index is in the range of possible elements (inclusive).
index | the index to check |
axis2_status_t( * axis2_linked_list_ops_s::clear)(axis2_linked_list_t *linked_list, const axis2_env_t *env) |
Remove all elements from this list.
axis2_bool_t( * axis2_linked_list_ops_s::contains)(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o) |
Returns true if the list contains the given object. Comparison is done by o == null ? e = null : o.equals(e)
.
o | the element to look for |
void*( * axis2_linked_list_ops_s::get)(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index) |
Return the element at index.
index | the place to look |
entry_t*( * axis2_linked_list_ops_s::get_entry)(axis2_linked_list_t *linked_list, const axis2_env_t *env, int n) |
Obtain the Entry at a given position in a list. This method of course takes linear time, but it is intelligent enough to take the shorter of the paths to get to the Entry required. This implies that the first or last entry in the list is obtained in constant time, which is a very desirable property. For speed and flexibility, range checking is not done in this method: Incorrect values will be returned if (n < 0) or (n >= size).
n | the number of the entry to get |
void*( * axis2_linked_list_ops_s::get_first)(axis2_linked_list_t *linked_list, const axis2_env_t *env) |
Returns the first element in the list.
void*( * axis2_linked_list_ops_s::get_last)(axis2_linked_list_t *linked_list, const axis2_env_t *env) |
Returns the last element in the list.
int( * axis2_linked_list_ops_s::index_of)(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o) |
Returns the first index where the element is located in the list, or -1.
o | the element to look for |
int( * axis2_linked_list_ops_s::last_index_of)(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o) |
Returns the last index where the element is located in the list, or -1.
o | the element to look for |
axis2_bool_t( * axis2_linked_list_ops_s::remove)(axis2_linked_list_t *linked_list, const axis2_env_t *env, void *o) |
Removes the entry at the lowest index in the list that matches the given object, comparing by o == null ? e = null : o.equals(e)
.
o | the object to remove |
void*( * axis2_linked_list_ops_s::remove_at_index)(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index) |
Removes the element at the given position from the list.
index | the location of the element to remove |
axis2_status_t( * axis2_linked_list_ops_s::remove_entry)(axis2_linked_list_t *linked_list, const axis2_env_t *env, entry_t *e) |
Remove an entry from the list. This will adjust size and deal with `first' and `last' appropriatly.
e | the entry to remove |
void*( * axis2_linked_list_ops_s::remove_first)(axis2_linked_list_t *linked_list, const axis2_env_t *env) |
Remove and return the first element in the list.
void*( * axis2_linked_list_ops_s::remove_last)(axis2_linked_list_t *linked_list, const axis2_env_t *env) |
Remove and return the last element in the list.
void*( * axis2_linked_list_ops_s::set)(axis2_linked_list_t *linked_list, const axis2_env_t *env, int index, void *o) |
Replace the element at the given location in the list.
index | which index to change | |
o | the new element |
int( * axis2_linked_list_ops_s::size)(axis2_linked_list_t *linked_list, const axis2_env_t *env) |
Returns the size of the list.
void**( * axis2_linked_list_ops_s::to_array)(axis2_linked_list_t *linked_list, const axis2_env_t *env) |
Returns an array which contains the elements of the list in order.