Array Methods

The methods defined in the Array class are summarized in the following table.

Method Description
add Adds an entry to the end of the array
at Returns the entry at a specified index in the array
atPut Places an entry at a specified index in the array
countOf Returns the number of times the specified entry occurs in the array
countOf64 Returns the number of times the specified entry occurs in the array as an Integer64 value
createIterator Creates an iterator for the array
first Returns the first entry in the array
getStatistics Analyzes the array and returns structural statistics
includes Returns true if the array contains a specified object
indexOf Returns the index of a specified entry if it exists in the array
indexOf64 Returns the index of a specified entry if it exists in the array as an Integer64 value
initialise Initializes an array with null entries up to a size specified by the value of the count parameter
insert Inserts an entry at a specified index in the array and moves up all higher entries
last Returns the last entry in the array
remove Removes a specified entry from an array, and moves all higher entries down
removeAt Removes an entry at a specified index from an array, and moves all higher entries down
replace Replaces an existing entry in an array with another entry
tryAdd Attempts to add the specified value to the array
tryAddDeferred Executes a deferred attempt to add a value to the array
tryCopy__ Copies the values from the receiver array to the specified target collection that are not present in the target collection, and returns a reference to the target collection
tryRemove Attempts to remove the specified value from the array
tryRemoveDeferred Executes a deferred attempt to remove the specified value from the array