Package-level declarations
Collection types, such as Iterable, Collection, List, Set, Map and related top-level and extension functions.
Collection types, such as Iterable, Collection, List, Set, Map and related top-level and extension functions.
Types
Provides a skeletal implementation of the read-only Collection interface.
Provides a skeletal implementation of the read-only Collection interface.
A base class to simplify implementing iterators so that implementations only have to implement computeNext to implement the iterator, calling done when the iteration is complete.
A base class to simplify implementing iterators so that implementations only have to implement computeNext to implement the iterator, calling done when the iteration is complete.
Provides a skeletal implementation of the MutableList interface.
An iterator over a sequence of values of type Boolean
.
An iterator over a sequence of values of type Boolean
.
An iterator over a sequence of values of type Byte
.
An iterator over a sequence of values of type Byte
.
An iterator over a sequence of values of type Char
.
An iterator over a sequence of values of type Char
.
A generic collection of elements. Methods in this interface support only read-only access to the collection; read/write access is supported through the MutableCollection interface.
A generic collection of elements. Methods in this interface support only read-only access to the collection; read/write access is supported through the MutableCollection interface.
An iterator over a sequence of values of type Double
.
An iterator over a sequence of values of type Double
.
An iterator over a sequence of values of type Float
.
An iterator over a sequence of values of type Float
.
Represents a source of elements with a keyOf function, which can be applied to each element to get its key.
Data class representing a value from a collection or sequence, along with its index in that collection or sequence.
Data class representing a value from a collection or sequence, along with its index in that collection or sequence.
An iterator over a sequence of values of type Int
.
An iterator over a sequence of values of type Int
.
Classes that inherit from this interface can be represented as a sequence of elements that can be iterated over.
An iterator over a collection or another entity that can be represented as a sequence of elements. Allows to sequentially access the elements.
A generic ordered collection of elements. Methods in this interface support only read-only access to the list; read/write access is supported through the MutableList interface.
A generic ordered collection of elements. Methods in this interface support only read-only access to the list; read/write access is supported through the MutableList interface.
An iterator over a collection that supports indexed access.
An iterator over a collection that supports indexed access.
An iterator over a sequence of values of type Long
.
An iterator over a sequence of values of type Long
.
A collection that holds pairs of objects (keys and values) and supports efficiently retrieving the value corresponding to each key. Map keys are unique; the map holds only one value for each key. Methods in this interface support only read-only access to the map; read-write access is supported through the MutableMap interface.
A collection that holds pairs of objects (keys and values) and supports efficiently retrieving the value corresponding to each key. Map keys are unique; the map holds only one value for each key. Methods in this interface support only read-only access to the map; read-write access is supported through the MutableMap interface.
A generic collection of elements that supports adding and removing elements.
A generic collection of elements that supports adding and removing elements.
Classes that inherit from this interface can be represented as a sequence of elements that can be iterated over and that supports removing elements during iteration.
Classes that inherit from this interface can be represented as a sequence of elements that can be iterated over and that supports removing elements during iteration.
An iterator over a mutable collection. Provides the ability to remove elements while iterating.
An iterator over a mutable collection. Provides the ability to remove elements while iterating.
A generic ordered collection of elements that supports adding and removing elements.
A generic ordered collection of elements that supports adding and removing elements.
An iterator over a mutable collection that supports indexed access. Provides the ability to add, modify and remove elements while iterating.
An iterator over a mutable collection that supports indexed access. Provides the ability to add, modify and remove elements while iterating.
A modifiable collection that holds pairs of objects (keys and values) and supports efficiently retrieving the value corresponding to each key. Map keys are unique; the map holds only one value for each key.
A generic unordered collection of elements that does not support duplicate elements, and supports adding and removing elements.
A generic unordered collection of elements that does not support duplicate elements, and supports adding and removing elements.
A generic unordered collection of elements that does not support duplicate elements. Methods in this interface support only read-only access to the set; read/write access is supported through the MutableSet interface.
A generic unordered collection of elements that does not support duplicate elements. Methods in this interface support only read-only access to the set; read/write access is supported through the MutableSet interface.
An iterator over a sequence of values of type Short
.
An iterator over a sequence of values of type Short
.
Properties
Returns the index of the last item in the list or -1 if the list is empty.
Returns the last valid index for the array.
Returns the index of the last item in the list or -1 if the list is empty.
Functions
Adds all elements of the given elements array to this MutableCollection.
Adds all elements of the given elements collection to this MutableCollection.
Adds all elements of the given elements sequence to this MutableCollection.
Adds all elements of the given elements array to this MutableCollection.
Adds all elements of the given elements collection to this MutableCollection.
Adds all elements of the given elements sequence to this MutableCollection.
Groups elements from the Grouping source by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in a new map.
Groups elements from the Grouping source by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in a new map.
Groups elements from the Grouping source by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in the given destination map.
Groups elements from the Grouping source by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in the given destination map.
Returns true
if array has at least one element.
Returns true
if collection has at least one element.
Returns true
if map has at least one entry.
Returns true
if at least one element matches the given predicate.
Returns true
if at least one entry matches the given predicate.
Returns a List that wraps the original array.
Returns a reversed read-only view of the original List. All changes made in the original list will be reflected in the reversed one.
Returns a reversed mutable view of the original mutable List. All changes made in the original list will be reflected in the reversed one and vice versa.
Returns a reversed read-only view of the original List. All changes made in the original list will be reflected in the reversed one.
Returns a reversed mutable view of the original mutable List. All changes made in the original list will be reflected in the reversed one and vice versa.
Creates a Sequence instance that wraps the original array returning its elements when being iterated.
Creates a Sequence instance that wraps the original collection returning its elements when being iterated.
Creates a Sequence instance that wraps the original map returning its entries when being iterated.
Returns a Map containing the elements from the given array indexed by the key returned from keySelector function applied to each element.
Returns a Map containing the elements from the given collection indexed by the key returned from keySelector function applied to each element.
Returns a Map containing the values provided by valueTransform and indexed by keySelector functions applied to elements of the given array.
Returns a Map containing the values provided by valueTransform and indexed by keySelector functions applied to elements of the given collection.
Populates and returns the destination mutable map with key-value pairs, where key is provided by the keySelector function applied to each element of the given array and value is the element itself.
Populates and returns the destination mutable map with key-value pairs, where key is provided by the keySelector function applied to each element of the given collection and value is the element itself.
Populates and returns the destination mutable map with key-value pairs, where key is provided by the keySelector function and and value is provided by the valueTransform function applied to elements of the given array.
Populates and returns the destination mutable map with key-value pairs, where key is provided by the keySelector function and and value is provided by the valueTransform function applied to elements of the given collection.
Populates and returns the destination mutable map with key-value pairs provided by transform function applied to each element of the given array.
Populates and returns the destination mutable map with key-value pairs provided by transform function applied to each element of the given collection.
Returns an average value of elements in the array.
Returns an average value of elements in the collection.
Searches this list or its range for an element for which the given comparison function returns zero using the binary search algorithm.
Searches this list or its range for the provided element using the binary search algorithm. The list is expected to be sorted into ascending order according to the Comparable natural ordering of its elements, otherwise the result is undefined.
Searches this list or its range for the provided element using the binary search algorithm. The list is expected to be sorted into ascending order according to the specified comparator, otherwise the result is undefined.
Searches the array or the range of the array for the provided element using the binary search algorithm. The array is expected to be sorted, otherwise the result is undefined.
Searches this list or its range for an element for which the given comparison function returns zero using the binary search algorithm.
Searches this list or its range for the provided element using the binary search algorithm. The list is expected to be sorted into ascending order according to the Comparable natural ordering of its elements, otherwise the result is undefined.
Searches the array or the range of the array for the provided element using the binary search algorithm. The array is expected to be sorted according to the specified comparator, otherwise the result is undefined.
Searches this list or its range for the provided element using the binary search algorithm. The list is expected to be sorted into ascending order according to the specified comparator, otherwise the result is undefined.
Searches this list or its range for an element having the key returned by the specified selector function equal to the provided key value using the binary search algorithm. The list is expected to be sorted into ascending order according to the Comparable natural ordering of keys of its elements. otherwise the result is undefined.
Searches this list or its range for an element having the key returned by the specified selector function equal to the provided key value using the binary search algorithm. The list is expected to be sorted into ascending order according to the Comparable natural ordering of keys of its elements. otherwise the result is undefined.
Returns the key component of the map entry.
Returns 1st element from the array.
Returns 1st element from the list.
Returns the key component of the map entry.
Returns the value component of the map entry.
Returns 2nd element from the array.
Returns 2nd element from the list.
Returns the value component of the map entry.
Returns 3rd element from the array.
Returns 3rd element from the list.
Returns 4th element from the array.
Returns 4th element from the list.
Returns 5th element from the array.
Returns 5th element from the list.
Checks if all elements in the specified collection are contained in this collection.
Checks if all elements in the specified collection are contained in this collection.
Returns true
if the two specified arrays are structurally equal to one another, i.e. contain the same number of the same elements in the same order.
Returns a hash code based on the contents of this array as if it is List.
Returns a string representation of the contents of the specified array as if it is List.
Returns new array which is a copy of the original array.
Returns new array which is a copy of the original array, resized to the given newSize. The copy is either truncated or padded at the end with null
values if necessary.
Returns new array which is a copy of the original array, resized to the given newSize. The copy is either truncated or padded at the end with false
values if necessary.
Returns new array which is a copy of the original array, resized to the given newSize. The copy is either truncated or padded at the end with zero values if necessary.
Returns new array which is a copy of the original array, resized to the given newSize. The copy is either truncated or padded at the end with null char (\u0000
) values if necessary.
Returns a new array which is a copy of the specified range of the original array.
Returns the number of elements in this array.
Returns the number of elements in this collection.
Returns the number of entries in this map.
Returns the number of elements matching the given predicate.
Returns the number of entries matching the given predicate.
Returns a list containing only distinct elements from the given array.
Returns a list containing only distinct elements from the given collection.
Returns a list containing all elements except first n elements.
Returns a list containing all elements except last n elements.
Returns a list containing all elements except last elements that satisfy the given predicate.
Returns a list containing all elements except first elements that satisfy the given predicate.
Groups elements from the Grouping source by key and counts elements in each group to the given destination map.
Groups elements from the Grouping source by key and counts elements in each group to the given destination map.
Returns an element at the given index or throws an IndexOutOfBoundsException if the index is out of bounds of this array.
Returns an element at the given index or throws an IndexOutOfBoundsException if the index is out of bounds of this collection.
Returns an element at the given index or throws an IndexOutOfBoundsException if the index is out of bounds of this list.
Returns an element at the given index or the result of calling the defaultValue function if the index is out of bounds of this array.
Returns an element at the given index or the result of calling the defaultValue function if the index is out of bounds of this collection.
Returns an element at the given index or the result of calling the defaultValue function if the index is out of bounds of this list.
Fills this array or its subrange with the specified element value.
Returns a list containing only elements matching the given predicate.
Appends all elements matching the given predicate to the given destination.
Returns a list containing all elements that are instances of specified type parameter R.
Returns a list containing all elements that are instances of specified class.
Appends all elements that are instances of specified type parameter R to the given destination.
Appends all elements that are instances of specified class to the given destination.
Returns a map containing all key-value pairs with keys matching the given predicate.
Appends all elements that are not null
to the given destination.
Appends all entries not matching the given predicate into the given destination.
Appends all elements not matching the given predicate to the given destination.
Appends all entries not matching the given predicate into the given destination.
Appends all entries matching the given predicate into the mutable map given as destination parameter.
Appends all elements matching the given predicate to the given destination.
Appends all entries matching the given predicate into the mutable map given as destination parameter.
Returns a map containing all key-value pairs with values matching the given predicate.
Returns the first element matching the given predicate, or null
if no such element was found.
Returns the last element matching the given predicate, or null
if no such element was found.
Returns first element.
Returns the first element matching the given predicate.
Returns the first element, or null
if the array is empty.
Returns the first element, or null
if the collection is empty.
Returns the first element, or null
if the list is empty.
Returns the first element matching the given predicate, or null
if element was not found.
Returns a single list of all elements yielded from results of transform function being invoked on each element of original array.
Returns a single list of all elements yielded from results of transform function being invoked on each element of original collection.
Returns a single list of all elements yielded from results of transform function being invoked on each entry of original map.
Appends all elements yielded from results of transform function being invoked on each element of original array, to the given destination.
Appends all elements yielded from results of transform function being invoked on each element of original collection, to the given destination.
Appends all elements yielded from results of transform function being invoked on each entry of original map, to the given destination.
Returns a single list of all elements from all arrays in the given array.
Returns a single list of all elements from all collections in the given collection.
Groups elements from the Grouping source by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in a new map. An initial value of accumulator is the same initialValue for each group.
Groups elements from the Grouping source by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in a new map. An initial value of accumulator is provided by initialValueSelector function.
Accumulates value starting with initial value and applying operation from left to right to current accumulator value and each element.
Groups elements from the Grouping source by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in a new map. An initial value of accumulator is the same initialValue for each group.
Groups elements from the Grouping source by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in a new map. An initial value of accumulator is provided by initialValueSelector function.
Accumulates value starting with initial value and applying operation from left to right to current accumulator value and each element with its index in the original array.
Accumulates value starting with initial value and applying operation from left to right to current accumulator value and each element with its index in the original collection.
Accumulates value starting with initial value and applying operation from right to left to each element with its index in the original array and current accumulator value.
Accumulates value starting with initial value and applying operation from right to left to each element with its index in the original list and current accumulator value.
Groups elements from the Grouping source by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in the given destination map. An initial value of accumulator is the same initialValue for each group.
Groups elements from the Grouping source by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in the given destination map. An initial value of accumulator is provided by initialValueSelector function.
Groups elements from the Grouping source by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in the given destination map. An initial value of accumulator is the same initialValue for each group.
Groups elements from the Grouping source by key and applies operation to the elements of each group sequentially, passing the previously accumulated value and the current element as arguments, and stores the results in the given destination map. An initial value of accumulator is provided by initialValueSelector function.
Performs the given action on each element, providing sequential index with the element.
Returns the value corresponding to the given key, or null
if such a key is not present in the map.
Returns the value for the given key, or the result of the defaultValue function if there was no entry for the given key.
Returns an element at the given index or the result of calling the defaultValue function if the index is out of bounds of this array.
Returns an element at the given index or the result of calling the defaultValue function if the index is out of bounds of this list.
Returns the value for the given key, or the result of the defaultValue function if there was no entry for the given key.
Returns the value for the given key. If the key is not found in the map, calls the defaultValue function, puts its result into the map under the given key and returns it.
Concurrent getOrPut, that is safe for concurrent maps.
Returns the value for the given key. If the key is not found in the map, calls the defaultValue function, puts its result into the map under the given key and returns it.
Returns the value for the given key or throws an exception if there is no such key in the map.
Returns the value of the property for the given object from this read-only map.
Returns the value of the property for the given object from this mutable map.
Returns the value for the given key or throws an exception if there is no such key in the map.
Returns the value of the property for the given object from this read-only map.
Returns the value of the property for the given object from this mutable map.
Groups elements of the original array by the key returned by the given keySelector function applied to each element and returns a map where each group key is associated with a list of corresponding elements.
Groups elements of the original collection by the key returned by the given keySelector function applied to each element and returns a map where each group key is associated with a list of corresponding elements.
Groups values returned by the valueTransform function applied to each element of the original array by the key returned by the given keySelector function applied to the element and returns a map where each group key is associated with a list of corresponding values.
Groups values returned by the valueTransform function applied to each element of the original collection by the key returned by the given keySelector function applied to the element and returns a map where each group key is associated with a list of corresponding values.