Package-level declarations
Properties
Returns a list containing all values in a SparseArray.
Functions
Adds the item if it is not in the collection or removes it if it is.
Replaces the first item within the list that matches the given predicate or adds the item to the list if none match.
Returns an empty new ArrayDeque.
Returns a new ArrayDeque with the given elements.
Populates and returns a SparseArray by populating with keys provided by keySelector and values that are the elements themselves.
Populates and returns a SparseArray by populating with keys provided by keySelector and values provided by valueTransform.
Populates and returns the destination array by populating with keys provided by keySelector and values that are the elements themselves.
Populates and returns the destination array by populating with keys provided by keySelector and values provided by valueTransform.
Filters all entries matching given predicate into a new SparseArray.
Writes all entries matching given predicate to destination array.
Returns the first element which is not null.
Returns the first element which is not null, or the result of calling the defaultValue function if there are no elements or all elements are null.
Returns the first element matching the given predicate, or the result of calling the defaultValue function if no such element is found.
Gets value with specific key. If the value is not present, calls defaultValue to obtain a non-null value which is placed into the array, then returned.
Find the index of the minimal element of an array.
ARRAY
SET
Returns the last element which is not null.
Returns the last element which is not null, or the result of calling the defaultValue function if there are no elements or all elements are null.
Returns the last element matching the given predicate, or the result of calling the defaultValue function if no such element is found.
Finds the first least common item
Finds the first most common item
Moves the given element T up the MutableList by an index increment unless it is at the bottom already which will result in no movement. Returns a Boolean
indicating if move was successful
Moves first element T down an index that satisfies the given predicate, unless its already at the bottom
Moves all T elements down an index that satisfy the given predicate, unless they are already at the bottom
Moves the given element T up the MutableList by one increment unless it is at the bottom already which will result in no movement
Moves the given element T up the MutableList by an index increment unless it is at the top already which will result in no movement. Returns a Boolean
indicating if move was successful
Moves first element T up an index that satisfies the given predicate, unless its already at the top
Copies keys and values from specified SparseArray, overwriting own key/value pairs.
SAFE MUTABLE
This function uses a trick by a famous mathematician, Fredrick Gauss. Algorithm is O(1).