Additional top-level class in compilation unit: IndexedSeqModule.
Efficient random access is characteristic for indexed sequences.
| Modifier and Type | Field and Description |
|---|---|
| public static final long |
| Modifier and Type | Method and Description |
|---|---|
| public IndexedSeq | |
| public IndexedSeq | appendAll(Iterable<? extends T>
An Iterable of elements elements)Redeclares io. Appends all given elements to this. |
| public IndexedSeq | asJava(Consumer<? super List<T>>
A side-effecting unit of work that operates on an immutable action)java.util.List view.Redeclares io. Creates an immutable |
| public IndexedSeq | asJavaMutable(Consumer<? super List<T>>
A side-effecting unit of work that operates on a mutable action)java.util.List view.Redeclares io. Creates a mutable |
| public default PartialFunction | asPartialFunction()
Implements io. Turns this |
| public <R> IndexedSeq | collect(PartialFunction<? super T, ? extends R>
A function that is not necessarily defined of all elements of this traversable. partialFunction)Redeclares io. Collects all elements that are in the domain of the given |
| public IndexedSeq | combinations()
Redeclares io. Returns the union of all combinations from k = 0 to length(). |
| public IndexedSeq | combinations(int
Size of subsets k)Redeclares io. Returns the k-combination of this traversable, i.e. all subset of this of k distinct elements. |
| public Iterator | crossProduct(int
the number of cartesian multiplications power)Redeclares io. Calculates the n-ary cartesian power (or cross product or simply product) of this. |
| public IndexedSeq | distinct()
Redeclares io. Returns a new version of this which contains no duplicates. |
| public IndexedSeq | distinctBy(Comparator<? super T>
A comparator comparator)Redeclares io. Returns a new version of this which contains no duplicates. |
| public <U> IndexedSeq | distinctBy(Function<? super T, ? extends U>
A key extractor keyExtractor)Redeclares io. Returns a new version of this which contains no duplicates. |
| public IndexedSeq | drop(int
The number of elements to drop. n)Redeclares io. Drops the first n elements of this or all elements, if this length < n. |
| public IndexedSeq | dropRight(int
The number of elements to drop. n)Redeclares io. Drops the last n elements of this or all elements, if this length < n. |
| public IndexedSeq | dropRightUntil(Predicate<? super T>
A condition tested subsequently for this elements, starting from the end. predicate)Redeclares io. Drops elements until the predicate holds for the current element, starting from the end. |
| public IndexedSeq | dropRightWhile(Predicate<? super T>
A condition tested subsequently for this elements, starting from the end. predicate)Redeclares io. Drops elements while the predicate holds for the current element, starting from the end. |
| public IndexedSeq | dropUntil(Predicate<? super T>
A condition tested subsequently for this elements. predicate)Redeclares io. Drops elements until the predicate holds for the current element. |
| public IndexedSeq | dropWhile(Predicate<? super T>
A condition tested subsequently for this elements. predicate)Redeclares io. Drops elements while the predicate holds for the current element. |
| public default boolean | endsWith(Seq<? extends T>
the sequence to test that)Overrides default io. Tests whether this sequence ends with the given sequence. |
| public IndexedSeq | filter(Predicate<? super T>
A predicate predicate)Redeclares io. Returns a new traversable consisting of all elements which satisfy the given predicate. |
| public <U> IndexedSeq | flatMap(Function<? super T, ? extends Iterable<? extends U>>
A mapper mapper)Redeclares io. FlatMaps this Traversable. |
| public <C> Map | groupBy(Function<? super T, ? extends C>
A function which classifies elements into classes classifier)Redeclares io. Groups this elements by classifying the elements. |
| public Iterator | grouped(int
a positive block size size)Redeclares io. Groups this |
| public default int | indexOfSlice(Iterable<? extends T>
the sequence to test that, int the start index from)Implements io. Finds first index after or at a start index where this sequence contains a given sequence as a slice. |
| public default int | indexWhere(Predicate<? super T>
the predicate used to test elements. predicate, int the start index from)Implements io. Finds index of the first element satisfying some predicate after or at some start index. |
| public IndexedSeq | init()
Redeclares io. Dual of tail(), returning all elements except the last. |
| public Option | initOption()
Redeclares io. Dual of tailOption(), returning all elements except the last as |
| public IndexedSeq | insert(int
an index index, T an element element)Redeclares io. Inserts the given element at the specified index. |
| public IndexedSeq | insertAll(int
an index index, Iterable<? extends T> An Iterable of elements elements)Redeclares io. Inserts the given elements at the specified index. |
| public IndexedSeq | intersperse(T
An element. element)Redeclares io. Inserts an element between all elements of this Traversable. |
| public default boolean | isDefinedAt(Integer
a potential function argument index)Implements io.
Deprecated
Tests if a value is contained in the function's domain. |
| public default T | |
| public default int | lastIndexOfSlice(Iterable<? extends T>
the sequence to test that, int the end index end)Implements io. Finds last index before or at a given end index where this sequence contains a given sequence as a slice. |
| public default int | lastIndexWhere(Predicate<? super T>
the predicate used to test elements. predicate, int the maximum index of the search end)Implements io. Finds index of last element satisfying some predicate before or at given end index. |
| public <U> IndexedSeq | map(Function<? super T, ? extends U>
A mapper. mapper)Redeclares io. Maps the elements of this |
| public static < Component type of the T> IndexedSeqIndexedSeq. | Returns: the givenindexedSeq instance as narrowed type IndexedSeq<T>.An indexedSeq)IndexedSeq.Narrows a widened |
| public IndexedSeq | orElse(Iterable<? extends T>
An alternative other)TraversableRedeclares io. Returns this |
| public IndexedSeq | orElse(Supplier<? extends Iterable<? extends T>>
An alternative supplier)Traversable supplierRedeclares io. Returns this |
| public IndexedSeq | padTo(int
the target length length, T the padding element element)Redeclares io. A copy of this sequence with an element appended until a given target length is reached. |
| public Tuple2 | partition(Predicate<? super T>
A predicate which classifies an element if it is in the first or the second traversable. predicate)Redeclares io. Creates a partition of this |
| public IndexedSeq | patch(int
the index of the first replaced element from, Iterable<? extends T> sequence for replacement that, int the number of elements to drop in the original list replaced)Redeclares io. Produces a new list where a slice of elements in this list is replaced by another sequence. |
| public IndexedSeq | peek(Consumer<? super T>
The action that will be performed on the element(s). action)Redeclares io. Performs the given |
| public IndexedSeq | |
| public IndexedSeq | |
| public IndexedSeq | prependAll(Iterable<? extends T>
An Iterable of elements elements)Redeclares io. Prepends all given elements to this. |
| public IndexedSeq | reject(Predicate<? super T>
A predicate predicate)Redeclares io. Returns a new traversable consisting of all elements which do not satisfy the given predicate. |
| public IndexedSeq | remove(T
An element to be removed from this Seq. element)Redeclares io. Removes the first occurrence of the given element. |
| public IndexedSeq | removeAll(T
An element to be removed from this Seq. element)Redeclares io. Removes all occurrences of the given element. |
| public IndexedSeq | removeAll(Iterable<? extends T>
Elements to be removed from this Seq. elements)Redeclares io. Removes all occurrences of the given elements. |
| public IndexedSeq | removeAll(Predicate<? super T>
the predicate used to test elements predicate)Redeclares io.
Deprecated
Returns a new Seq consisting of all elements which do not satisfy the given predicate. |
| public IndexedSeq | removeAt(int
position of element to remove index)Redeclares io. Removes the element at the specified position in this sequence. |
| public IndexedSeq | removeFirst(Predicate<T>
an predicate predicate)Redeclares io. Removes the first occurrence that satisfy predicate |
| public IndexedSeq | removeLast(Predicate<T>
an predicate predicate)Redeclares io. Removes the last occurrence that satisfy predicate |
| public IndexedSeq | replace(T
An element to be substituted. currentElement, T A replacement for currentElement. newElement)Redeclares io. Replaces the first occurrence (if exists) of the given currentElement with newElement. |
| public IndexedSeq | replaceAll(T
An element to be substituted. currentElement, T A replacement for currentElement. newElement)Redeclares io. Replaces all occurrences of the given currentElement with newElement. |
| public IndexedSeq | retainAll(Iterable<? extends T>
Elements to be kept. elements)Redeclares io. Keeps all occurrences of the given elements from this. |
| public IndexedSeq | |
| public default Iterator | reverseIterator()
Implements io. An iterator yielding elements in reversed order. |
| public IndexedSeq | rotateLeft(int
distance of left rotation n)Redeclares io. Circular rotates the elements by the specified distance to the left direction. |
| public IndexedSeq | rotateRight(int
distance of right rotation n)Redeclares io. Circular rotates the elements by the specified distance to the right direction. |
| public IndexedSeq | scan(T
neutral element for the operator op zero, BiFunction<? super T, ? super T, ? extends T> the associative operator for the scan operation)Redeclares io. Computes a prefix scan of the elements of the collection. |
| public <U> IndexedSeq | scanLeft(U
the initial value zero, BiFunction<? super U, ? super T, ? extends U> the binary operator applied to the intermediate result and the element operation)Redeclares io. Produces a collection containing cumulative results of applying the operator going left to right. |
| public <U> IndexedSeq | scanRight(U
the initial value zero, BiFunction<? super T, ? super U, ? extends U> the binary operator applied to the intermediate result and the element operation)Redeclares io. Produces a collection containing cumulative results of applying the operator going right to left. |
| public default int | Returns: the index of the search element, if it is contained in the sequence; otherwise,(-(insertion point) - 1). The
insertion point is defined as the point at which the
element would be inserted into the sequence. Note that this guarantees that
the return value will be >= 0 if and only if the element is found.the element to find element)Implements io. Searches this sequence for a specific element using a binary search. |
| public default int | Returns: the index of the search element, if it is contained in the sequence; otherwise,(-(insertion point) - 1). The
insertion point is defined as the point at which the
element would be inserted into the sequence. Note that this guarantees that
the return value will be >= 0 if and only if the element is found.the element to find element, Comparator<? super T> the comparator by which this sequence is ordered comparator)Implements io. Searches this sequence for a specific element using a binary search. |
| public default int | segmentLength(Predicate<? super T>
the predicate used to test elements. predicate, int the index where the search starts. from)Implements io. Computes length of longest segment whose elements all satisfy some predicate. |
| public IndexedSeq | shuffle()
Redeclares io. Randomize the order of the elements in the current sequence. |
| public IndexedSeq | slice(int
the beginning index, inclusive beginIndex, int the end index, exclusive endIndex)Redeclares io. Returns a Seq that is a slice of this. |
| public Iterator | slideBy(Function<? super T, ?>
A function which classifies elements into classes classifier)Redeclares io. Slides a non-overlapping window of a variable size over this |
| public Iterator | sliding(int
a positive window size size)Redeclares io. Slides a window of a specific |
| public Iterator | sliding(int
a positive window size size, int a positive step size step)Redeclares io. Slides a window of a specific |
| public <U extends Comparable | sortBy(Function<? super T, ? extends U>
A mapper mapper)Redeclares io. Sorts this elements by comparing the elements in a different domain, using the given |
| public <U> IndexedSeq | sortBy(Comparator<? super U>
A comparator comparator, Function<? super T, ? extends U> A mapper mapper)Redeclares io. Sorts this elements by comparing the elements in a different domain, using the given |
| public IndexedSeq | sorted()
Redeclares io. Sorts this elements according to their natural order. |
| public IndexedSeq | sorted(Comparator<? super T>
A comparator comparator)Redeclares io. Sorts this elements according to the provided |
| public Tuple2 | span(Predicate<? super T>
A predicate. predicate)Redeclares io. Returns a tuple where the first element is the longest prefix of elements that satisfy the given
|
| public default boolean | startsWith(Iterable<? extends T>
the sequence to test that, int the index where the sequence is searched. offset)Overrides default io. Tests whether this list contains the given sequence at a given index. |
| public IndexedSeq | subSequence(int
the beginning index, inclusive beginIndex)Redeclares io. Returns a Seq that is a subsequence of this. |
| public IndexedSeq | subSequence(int
the beginning index, inclusive beginIndex, int the end index, exclusive endIndex)Redeclares io. Returns a Seq that is a subsequence of this. |
| public IndexedSeq | |
| public Option | tailOption()
Redeclares io. Drops the first element of a non-empty Traversable and returns an |
| public IndexedSeq | take(int
The number of elements to take. n)Redeclares io. Takes the first n elements of this or all elements, if this length < n. |
| public IndexedSeq | takeRight(int
The number of elements to take. n)Redeclares io. Takes the last n elements of this or all elements, if this length < n. |
| public IndexedSeq | takeRightUntil(Predicate<? super T>
A condition tested subsequently for this elements, starting from the end. predicate)Redeclares io. Takes elements until the predicate holds for the current element, starting from the end. |
| public IndexedSeq | takeRightWhile(Predicate<? super T>
A condition tested subsequently for this elements, starting from the end. predicate)Redeclares io. Takes elements while the predicate holds for the current element, starting from the end. |
| public IndexedSeq | takeUntil(Predicate<? super T>
A condition tested subsequently for this elements. predicate)Redeclares io. Takes elements until the predicate holds for the current element. |
| public IndexedSeq | takeWhile(Predicate<? super T>
A condition tested subsequently for the contained elements. predicate)Redeclares io. Takes elements while the predicate holds for the current element. |
| public <T1, T2> Tuple2 | unzip(Function<? super T, Tuple2<? extends T1, ? extends T2>>
a function which converts elements of this to pairs unzipper)Redeclares io. Unzips this elements by mapping this elements to pairs which are subsequently split into two distinct sets. |
| public <T1, T2, T3> Tuple3 | unzip3(Function<? super T, Tuple3<? extends T1, ? extends T2, ? extends T3>>
a function which converts elements of this to pairs unzipper)Redeclares io. Unzips this elements by mapping this elements to triples which are subsequently split into three distinct sets. |
| public IndexedSeq | update(int
an index index, T an element element)Redeclares io. Updates the given element at the specified index. |
| public IndexedSeq | update(int
an index index, Function<? super T, ? extends T> a function transforming the previous value updater)Redeclares io. Updates the given element at the specified index using the specified function. |
| public <U> IndexedSeq | zip(Iterable<? extends U>
The Iterable providing the second half of each result pair. that)Redeclares io. Returns a traversable formed from this traversable and another Iterable collection by combining corresponding elements in pairs. |
| public <U> IndexedSeq | zipAll(Iterable<? extends U>
The Iterable providing the second half of each result pair. that, T The element to be used to fill up the result if this traversable is shorter than that. thisElem, U The element to be used to fill up the result if that is shorter than this traversable. thatElem)Redeclares io. Returns a traversable formed from this traversable and another Iterable by combining corresponding elements in pairs. |
| public <U, R> IndexedSeq | zipWith(Iterable<? extends U>
The Iterable providing the second parameter of the mapper. that, BiFunction<? super T, ? super U, ? extends R> a mapper. mapper)Redeclares io. Returns a traversable formed from this traversable and another Iterable collection by mapping elements. |
| public IndexedSeq | zipWithIndex()
Redeclares io. Zips this traversable with its indices. |
| public <U> IndexedSeq | zipWithIndex(BiFunction<? super T, ? super Integer, ? extends U>
a mapper. mapper)Redeclares io. Zips this traversable with its indices by applying mapper provided. |