| Modifier and Type | Method and Description |
|---|---|
MutableSeq<T> |
append(java.util.Collection<? extends T> collection)
Append values to the seq at the end of it, resulting a new seq.
|
MutableSeq<T> |
append(Seq<? extends T> seq)
Append values to the seq at the end of it, resulting a new seq.
|
MutableSeq<T> |
append(T... values)
Append values to the seq at the end of it, resulting a new seq.
|
MutableSeq<T> |
append(T value)
Append values to the seq at the end of it, resulting a new seq.
|
MutableSeq<T> |
appendInPlace(java.util.Collection<? extends T> collection)
In-place method of
append(Collection) |
MutableSeq<T> |
appendInPlace(Seq<? extends T> seq)
In-place method of
append(Seq) |
MutableSeq<T> |
appendInPlace(T... values)
In-place method of
#append(T...) |
MutableSeq<T> |
appendInPlace(T value)
In-place method of
append(Object) |
MutableSeq<T> |
clear()
Remove all elements in the seq.
|
default MutableSeq<T> |
compact()
Returns a copy of the seq itself with all null elements removed.
|
MutableSeq<T> |
compactInPlace()
In-place method of
compact() |
MutableSeq<T> |
distinct()
Reduce duplicated elements, keeping only the first occurrence, resulting a new seq.
|
MutableSeq<T> |
distinctInPlace()
In-place method of
distinct() |
MutableSeq<MutableSeq<T>> |
eachCombination(int n)
Return a new Seq of all combinations of length n of elements from this seq.
|
MutableSeq<MutableSeq<T>> |
eachCons(int n)
Transform the seq, to a seq of each continuous n elements starting from each element.
|
MutableSeq<MutableSeq<T>> |
eachSlice(int n)
Slices this seq to construct some slices in the original order,
each of slice contains n elements(only the last slice can contain less than n elements).
|
MutableSeq<T> |
filter(java.util.function.BiPredicate<T,java.lang.Integer> condition)
Gets elements which satisfy the condition, resulting a new seq without changing the original one.
|
MutableSeq<T> |
filter(java.util.function.Predicate<T> condition)
Gets elements which satisfy the condition, resulting a new seq without changing the original one.
|
MutableSeq<T> |
filterInPlace(java.util.function.BiPredicate<T,java.lang.Integer> condition)
In-place method of
filter(BiPredicate) |
MutableSeq<T> |
filterInPlace(java.util.function.Predicate<T> condition)
In-place method of
filter(Predicate) |
MutableSeq<T> |
filterWhile(java.util.function.BiPredicate<T,java.lang.Integer> condition)
Gets elements at the front of this seq which satisfy the condition, resulting a new seq without changing the original one.
|
MutableSeq<T> |
filterWhile(java.util.function.Predicate<T> condition)
Gets elements at the front of this seq which satisfy the condition, resulting a new seq without changing the original one.
|
MutableSeq<T> |
filterWhileInPlace(java.util.function.BiPredicate<T,java.lang.Integer> condition)
In-place method of
filterWhile(BiPredicate) |
MutableSeq<T> |
filterWhileInPlace(java.util.function.Predicate<T> condition)
In-place method of
filterWhile(Predicate) |
<R> MutableSeq<R> |
flatMap(java.util.function.BiFunction<T,java.lang.Integer,Seq<R>> func)
Similar to
Seq.flatMap(Function), with additional parameter "index" as the second parameter of the lambda expression. |
<R> MutableSeq<R> |
flatMap(java.util.function.Function<T,Seq<R>> func)
Transform each element into a seq, and concat all seq together into a new seq.
|
<R> MutableSeq<R> |
map(java.util.function.BiFunction<T,java.lang.Integer,R> func)
Similar to
Seq.map(Function), with additional parameter "index" as the second parameter of the lambda expression. |
<R> MutableSeq<R> |
map(java.util.function.Function<T,R> func)
Transform each element of the seq into another value using the same function, resulting a new seq without changing the original one.
|
MutableSeq<T> |
prepend(java.util.Collection<? extends T> collection)
Prepend values into the seq at the beginning of it.
|
MutableSeq<T> |
prepend(Seq<? extends T> seq)
Prepend values into the seq at the beginning of it.
|
MutableSeq<T> |
prepend(T... values)
Prepend values into the seq at the beginning of it.
|
MutableSeq<T> |
prepend(T value)
Prepend values into the seq at the beginning of it.
|
MutableSeq<T> |
prependInPlace(java.util.Collection<? extends T> collection)
In-place method of
prepend(Collection) |
MutableSeq<T> |
prependInPlace(Seq<? extends T> seq)
In-place method of
prepend(Seq) |
MutableSeq<T> |
prependInPlace(T... values)
In-place method of
#prepend(T...) |
MutableSeq<T> |
prependInPlace(T value)
In-place method of
prepend(Object) |
MutableSeq<T> |
reject(java.util.function.BiPredicate<T,java.lang.Integer> condition)
Removes elements which satisfy the condition, resulting a new seq without changing the original one.
|
MutableSeq<T> |
reject(java.util.function.Predicate<T> condition)
Removes elements which satisfy the condition, resulting a new seq without changing the original one.
|
MutableSeq<T> |
rejectInPlace(java.util.function.BiPredicate<T,java.lang.Integer> condition)
In-place method of
reject(BiPredicate) |
MutableSeq<T> |
rejectInPlace(java.util.function.Predicate<T> condition)
In-place method of
reject(Predicate) |
MutableSeq<T> |
rejectWhile(java.util.function.BiPredicate<T,java.lang.Integer> condition)
Removes elements at the front of this seq which satisfy the condition, resulting a new seq without changing the original one.
|
MutableSeq<T> |
rejectWhile(java.util.function.Predicate<T> condition)
Removes elements at the front of this seq which satisfy the condition, resulting a new seq without changing the original one.
|
MutableSeq<T> |
rejectWhileInPlace(java.util.function.BiPredicate<T,java.lang.Integer> condition)
In-place method of
rejectWhile(BiPredicate) |
MutableSeq<T> |
rejectWhileInPlace(java.util.function.Predicate<T> condition)
In-place method of
rejectWhile(Predicate) |
MutableSeq<T> |
repeat(int times)
Returns a new seq built by concatenating the times copies of this seq.
|
MutableSeq<T> |
repeatInPlace(int times)
In-place method of
repeat(int) |
MutableSeq<T> |
reverse()
Constructs a new seq containing all the elements of this seq in reverse order.
|
MutableSeq<T> |
reverseInPlace()
In-place method of
reverse() |
MutableSeq<T> |
sample(int n)
Randomly find n elements in the seq.
|
MutableSeq<T> |
set(int i,
T t)
Update the element at the index.
|
MutableSeq<T> |
shuffle()
Randomly shuffle the seq, resulting a new seq.
|
MutableSeq<T> |
shuffleInPlace()
In-place method of
shuffle() |
MutableSeq<T> |
sort(java.util.Comparator<? super T> comparator)
Sort the seq by the comparator, resulting a new seq, without changing the original seq.
|
MutableSeq<T> |
sortInPlace(java.util.Comparator<? super T> comparator)
In-place method of
sort(Comparator) |
MutableSeq<T> |
subSeq(int fromIndex,
int toIndex)
Create a new seq which is the sub seq of the current one.
|
all, all, any, any, contains, containsSubSeq, count, countIf, countIf, difference, findFirst, findFirstIndex, findLast, findLastIndex, first, forEach, forEach, forEachCombination, forEachCons, forEachReverse, forEachReverse, forEachSlice, get, get, indexOf, indexOfSubSeq, intersect, isEmpty, join, join, join, last, lastIndexOf, lastIndexOfSubSeq, max, min, none, none, reduce, reduce, sample, size, toArray, toArrayList<R> MutableSeq<R> map(java.util.function.Function<T,R> func)
Seq<R> MutableSeq<R> map(java.util.function.BiFunction<T,java.lang.Integer,R> func)
SeqSeq.map(Function), with additional parameter "index" as the second parameter of the lambda expression.<R> MutableSeq<R> flatMap(java.util.function.Function<T,Seq<R>> func)
Seq<R> MutableSeq<R> flatMap(java.util.function.BiFunction<T,java.lang.Integer,Seq<R>> func)
SeqSeq.flatMap(Function), with additional parameter "index" as the second parameter of the lambda expression.MutableSeq<T> sample(int n)
SeqMutableSeq<T> shuffle()
SeqMutableSeq<MutableSeq<T>> eachCons(int n)
Seq[1, 2, 3, 4] with n=2 will result to [[1, 2], [2, 3], [3, 4]]
If the size of seq is lower than n, result will be empty.MutableSeq<T> sort(java.util.Comparator<? super T> comparator)
SeqMutableSeq<T> distinct()
SeqMutableSeq<T> append(T value)
SeqNote: This method does NOT change the seq.
MutableSeq<T> append(T... values)
SeqNote: This method does NOT change the seq.
MutableSeq<T> append(java.util.Collection<? extends T> collection)
SeqNote: This method does NOT change the seq.
MutableSeq<T> append(Seq<? extends T> seq)
SeqNote: This method does NOT change the seq.
MutableSeq<T> prepend(T value)
SeqNote: This method does NOT change the seq.
MutableSeq<T> prepend(T... values)
SeqNote: This method does NOT change the seq.
MutableSeq<T> prepend(java.util.Collection<? extends T> collection)
SeqNote: This method does NOT change the seq.
MutableSeq<T> prepend(Seq<? extends T> seq)
SeqNote: This method does NOT change the seq.
MutableSeq<T> subSeq(int fromIndex, int toIndex)
SeqMutableSeq<T> reject(java.util.function.Predicate<T> condition)
SeqMutableSeq<T> reject(java.util.function.BiPredicate<T,java.lang.Integer> condition)
Seq
Similar to Seq.reject(Predicate), with additional parameter "index" as the second parameter of the lambda expression
MutableSeq<T> rejectWhile(java.util.function.Predicate<T> condition)
SeqrejectWhile in interface Seq<T>condition - the condition used to filter elements by passing the element,
returns true if the element satisfies the condition, otherwise returns false.MutableSeq<T> rejectWhile(java.util.function.BiPredicate<T,java.lang.Integer> condition)
Seq
Similar to Seq.reject(Predicate), with additional parameter "index" as the second parameter of the lambda expression
rejectWhile in interface Seq<T>condition - the condition used to filter elements by passing the element and its index,
returns true if the element satisfies the condition, otherwise returns false.MutableSeq<T> filter(java.util.function.Predicate<T> condition)
SeqMutableSeq<T> filter(java.util.function.BiPredicate<T,java.lang.Integer> condition)
Seq
Similar to Seq.filter(Predicate), with additional parameter "index" as the second parameter of the lambda expression.
MutableSeq<T> filterWhile(java.util.function.Predicate<T> condition)
SeqfilterWhile in interface Seq<T>condition - the condition used to filter elements by passing the element's index,
returns true if the element satisfies the condition, otherwise returns falseMutableSeq<T> filterWhile(java.util.function.BiPredicate<T,java.lang.Integer> condition)
Seq
Similar to Seq.filter(Predicate), with additional parameter "index" as the second parameter of the lambda expression.
filterWhile in interface Seq<T>condition - the condition used to filter elements by passing the element and its index,
returns true if the element satisfies the condition, otherwise returns falseMutableSeq<T> repeat(int times)
Seqdefault MutableSeq<T> compact()
SeqMutableSeq<MutableSeq<T>> eachSlice(int n)
SeqMutableSeq<T> reverse()
SeqMutableSeq<MutableSeq<T>> eachCombination(int n)
SeqSeq.distinct() before calling this method.eachCombination in interface Seq<T>MutableSeq<T> appendInPlace(T value)
append(Object)MutableSeq<T> appendInPlace(T... values)
#append(T...)MutableSeq<T> appendInPlace(java.util.Collection<? extends T> collection)
append(Collection)MutableSeq<T> appendInPlace(Seq<? extends T> seq)
append(Seq)MutableSeq<T> prependInPlace(T value)
prepend(Object)MutableSeq<T> prependInPlace(T... values)
#prepend(T...)MutableSeq<T> prependInPlace(java.util.Collection<? extends T> collection)
prepend(Collection)MutableSeq<T> prependInPlace(Seq<? extends T> seq)
prepend(Seq)MutableSeq<T> clear()
MutableSeq<T> set(int i, T t)
MutableSeq<T> shuffleInPlace()
shuffle()MutableSeq<T> reverseInPlace()
reverse()MutableSeq<T> distinctInPlace()
distinct()MutableSeq<T> repeatInPlace(int times)
repeat(int)MutableSeq<T> compactInPlace()
compact()MutableSeq<T> sortInPlace(java.util.Comparator<? super T> comparator)
sort(Comparator)MutableSeq<T> filterInPlace(java.util.function.Predicate<T> condition)
filter(Predicate)MutableSeq<T> filterInPlace(java.util.function.BiPredicate<T,java.lang.Integer> condition)
filter(BiPredicate)MutableSeq<T> filterWhileInPlace(java.util.function.Predicate<T> condition)
filterWhile(Predicate)MutableSeq<T> filterWhileInPlace(java.util.function.BiPredicate<T,java.lang.Integer> condition)
filterWhile(BiPredicate)MutableSeq<T> rejectInPlace(java.util.function.Predicate<T> condition)
reject(Predicate)MutableSeq<T> rejectInPlace(java.util.function.BiPredicate<T,java.lang.Integer> condition)
reject(BiPredicate)MutableSeq<T> rejectWhileInPlace(java.util.function.Predicate<T> condition)
rejectWhile(Predicate)MutableSeq<T> rejectWhileInPlace(java.util.function.BiPredicate<T,java.lang.Integer> condition)
rejectWhile(BiPredicate)