Int List
IntList is a List-like collection for Int values. It allows retrieving the elements without boxing. IntList is always backed by a MutableIntList, its MutableList-like subclass. The purpose of this class is to avoid the performance overhead of auto-boxing due to generics since Collection classes all operate on objects.
This implementation is not thread-safe: if multiple threads access this container concurrently, and one or more threads modify the structure of the list (insertion or removal for instance), the calling code must provide the appropriate synchronization. It is also not safe to mutate during reentrancy -- in the middle of a forEach, for example. However, concurrent reads are safe.
Inheritors
Functions
Splits this list into a list of InPlaceIntSubList each not exceeding the given chunkSize. The last list may have less elements than the given chunkSize.
Returns the element at the given index or defaultValue if index is out of bounds of the collection.
Iterates through the windows of the list and performs the given action on each window.
Iterates through the windows of the list with their indices and performs the given action on each window.
Returns true if there are elements in the IntList or false if it is empty.
Creates a String from the elements separated by separator and using prefix before and postfix after, if supplied.
Returns an List
Returns a DoubleList containing the results of applying the given transform function to each element in the original IntList.
Returns a FloatList containing the results of applying the given transform function to each element in the original IntList.
Returns a IntList containing the results of applying the given transform function to each element in the original IntList.
Returns a LongList containing the results of applying the given transform function to each element in the original IntList.
Returns a List containing the results of applying the given transform function to each element and its index in the original IntList.
Returns a DoubleList containing the results of applying the given transform function to each element and its index in the original IntList.
Returns a FloatList containing the results of applying the given transform function to each element and its index in the original IntList.
Returns a IntList containing the results of applying the given transform function to each element and its index in the original IntList.
Returns a LongList containing the results of applying the given transform function to each element and its index in the original IntList.
Returns true if all elements match the given predicate while iterating in the reverse order.
Returns true if any of the elements give a true return value for predicate while iterating in the reverse order.
Returns a new list of all elements sorted according to descending natural sort order.
Returns a IntArray containing all elements from this list in the same order.
Return a MutableSet of all elements. The returned set does NOT guarantee the element iteration order of the list.
Returns a WindowedIntList with the given windowSize sliding by step. Each window is a view into the original list.