List interface

Homepage Containers

Introduction

The List interface provides functions for working with lists (ordered, sequential data)


All Known Implementing Classes:
Array, Vector

Functions

Miscellaneous functions

List_add(ListObject, object)
List_add(ListObject, index, object):
Inserts the object at the specified position (optional function).

List_addAll(ListObject, list)
List_addAll(ListObject, index, list):
Inserts all the elements in the specified List to this List at the specified position (optional function).

List_clear(ListObject):
Destroys each item in the List. See the implementing class for additional details.

Size functions

List_size(ListObject):
Returns the number of elements in the List object.

Getters

List_get(ListObject, index, useFunction = ""):
Returns the value for the object stored in the List at the specified position.

List_getAddress(ListObject, index, useFunction = ""):
Returns the address for the object stored in the List at the specified position.

Setters

List_set(ListObject, index, object = 0):
Destroys the element stored at the specified position in the List object, and replaces it with the new object.

List_replace(ListObject, index, object = 0):
Replaces the element stored at the specified position with the new object.


List_remove(ListObject, index):
Destroys the element stored at the specific position in the List object, and removes it (optional function).

List`_discard(ListObject, index):
Removes (without destroying) the element stored at the specific position (optional function).

Search functions

Functions that start with an "S", by default, are case-sensitive. They are functionally equivalent to the respective function (the one without the "S") with true passed for the CaseSensitive parameter. They are provided for a convenient way to perform case-sensitive matching.

Functions that start with "regex" use a regular expression, instead of a value, to perform the matching. Apart from this, they are functionally equivalent to the respective function (the one without the "regex").


List_indexOf(ListObject, searchValue, startIndex = 1, useFunction = "getValue", CaseSensitive = false):
Searches for the first occurrence, starting with startIndex, for which the specified function returns the search value, and returns the index for this element.

List_SindexOf(ListObject, searchValue, startIndex = 1, useFunction = "getValue", CaseSensitive = true):
Searches for the first occurrence, starting with startIndex, for which the specified function returns the search value, and returns the index for this element.

List_regexIndexOf(ListObject, compareRegEx, startIndex = 1, useFunction = "getValue"):
Searches for the first occurrence, starting with startIndex, for which the specified function's return matches compareRegEx, and returns the index for this element.


List_findObject(ListObject, searchObject, startIndex = 1):
Searches for the first occurrence, starting with startIndex, of the specified object, and returns the index for this element.

List_firstUnset(ListObject, startIndex = 1):
Searches for the first occurrence of an unset element, and returns the index for this element.


List_findMatch(ListObject, searchValue, startIndex = 1, useFunction = "getValue", CaseSensitive = false):
Searches for the first occurrence, starting with startIndex, for which the specified function returns the search value, and returns the address for this element.

List_SfindMatch(ListObject, searchValue, startIndex = 1, useFunction = "getValue", CaseSensitive = true):
Searches for the first occurrence, starting with startIndex, for which the specified function returns the search value, and returns the address for this element.

List_regexFindMatch(ListObject, compareRegEx, startIndex = 1, useFunction = "getValue"):
Searches for the first occurrence, starting with startIndex, for which the specified function's return matches compareRegEx, and returns the address for this element.



List_lastIndexOf(ListObject, searchValue, startIndex = 0, useFunction = "getValue", CaseSensitive = false):
Searches for the last occurrence, starting with startIndex, for which the specified function returns the search value, and returns the index for this element.

List_SlastIndexOf(ListObject, searchValue, startIndex = 0, useFunction = "getValue", CaseSensitive = true):
Searches for the last occurrence, starting with startIndex, for which the specified function returns the search value, and returns the index for this element.

List_regexLastindexOf(ListObject, compareRegEx, startIndex = 0, useFunction = "getValue"):
Searches for the last occurrence, starting with startIndex, for which the specified function's return matches compareRegEx, and returns the index for this element.


List_findLastObject(ListObject, searchObject, startIndex = 0):
Searches for the last occurrence, starting with startIndex, of the specified object, and returns the index for this element.

List_lastUnset(ListObject, startIndex = 0):
Searches for the last occurrence of an unset element, and returns the index for this element.


List_findLastMatch(ListObject, searchValue, startIndex = 0, useFunction = "getValue", CaseSensitive = false):
Searches for the last occurrence, starting with startIndex, for which the specified function returns the search value, and returns the address for this element.

List_SfindLastMatch(ListObject, searchValue, startIndex = 0, useFunction = "getValue", CaseSensitive = true):
Searches for the last occurrence, starting with startIndex, for which the specified function returns the search value, and returns the address for this element.

List_regexFindLastMatch(ListObject, compareRegEx, startIndex = 0, useFunction = "getValue"):
Searches for the last occurrence, starting with startIndex, for which the specified function's return matches compareRegEx, and returns the address for this element.


Homepage  |  Containers