Interface MutableCharList
-
- All Superinterfaces:
CharIterable
,CharList
,MutableCharCollection
,OrderedCharIterable
,PrimitiveIterable
,ReversibleCharIterable
- All Known Implementing Classes:
CharArrayList
,SynchronizedCharList
,UnmodifiableCharList
public interface MutableCharList extends MutableCharCollection, CharList
This file was automatically generated from template file mutablePrimitiveList.stg.- Since:
- 3.0.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
addAllAtIndex(int index, char... source)
boolean
addAllAtIndex(int index, CharIterable source)
void
addAtIndex(int index, char element)
MutableCharList
asSynchronized()
MutableCharList
asUnmodifiable()
<V> MutableList<V>
collect(CharToObjectFunction<? extends V> function)
Returns a new collection with the results of applying the specified function on each element of the source collection.default <V> MutableList<V>
collectWithIndex(CharIntToObjectFunction<? extends V> function)
Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.MutableCharList
distinct()
default MutableCharList
newEmpty()
Creates a new empty mutable version of the same List type.MutableCharList
reject(CharPredicate predicate)
Returns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.default MutableCharList
rejectWithIndex(CharIntPredicate predicate)
Returns a new MutableCharList excluding all elements with corresponding indexes matching the specified predicate.char
removeAtIndex(int index)
MutableCharList
reverseThis()
MutableCharList
select(CharPredicate predicate)
Returns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.default MutableCharList
selectWithIndex(CharIntPredicate predicate)
Returns a new MutableCharList including all elements with corresponding indexes matching the specified predicate.char
set(int index, char element)
default MutableCharList
shuffleThis()
Randomly permutes this list mutating its contents and returns the same list (this).default MutableCharList
shuffleThis(java.util.Random rnd)
Randomly permutes this list mutating its contents and returns the same list (this).MutableCharList
sortThis()
Sorts this list mutating its contents and returns the same mutable list (this).default MutableCharList
sortThis(CharComparator comparator)
Sorts the internal data structure of this list and returns the list itself as a convenience.default <T> MutableCharList
sortThisBy(CharToObjectFunction<T> function)
Sorts the internal data structure of this list based on the natural order of the key returned byfunction
.default <T> MutableCharList
sortThisBy(CharToObjectFunction<T> function, java.util.Comparator<? super T> comparator)
Sorts the internal data structure of this list based on the key returned byfunction
using the providedcomparator
.MutableCharList
subList(int fromIndex, int toIndex)
default void
swap(int index1, int index2)
default MutableCharList
tap(CharProcedure procedure)
ImmutableCharList
toImmutable()
Returns an immutable copy of this list.MutableCharList
toReversed()
MutableCharList
with(char element)
MutableCharList
withAll(CharIterable elements)
MutableCharList
without(char element)
MutableCharList
withoutAll(CharIterable elements)
default <T> MutableList<CharObjectPair<T>>
zip(java.lang.Iterable<T> list)
Returns aMutableList
formed from thisMutableCharList
and aListIterable
by combining corresponding elements in pairs.default MutableList<CharCharPair>
zipChar(CharIterable iterable)
Returns aMutableList
formed from thisMutableCharList
and anotherCharList
by combining corresponding elements in pairs.-
Methods inherited from interface org.eclipse.collections.api.CharIterable
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.list.primitive.CharList
binarySearch, dotProduct, equals, forEachInBoth, get, hashCode, lastIndexOf
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableCharCollection
add, addAll, addAll, charIterator, clear, remove, removeAll, removeAll, removeIf, retainAll, retainAll
-
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedCharIterable
collectWithIndex, forEachWithIndex, getFirst, indexOf, rejectWithIndex, selectWithIndex
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.ReversibleCharIterable
asReversed, getLast, injectIntoWithIndex
-
-
-
-
Method Detail
-
addAtIndex
void addAtIndex(int index, char element)
-
addAllAtIndex
boolean addAllAtIndex(int index, char... source)
-
addAllAtIndex
boolean addAllAtIndex(int index, CharIterable source)
-
removeAtIndex
char removeAtIndex(int index)
-
set
char set(int index, char element)
-
swap
default void swap(int index1, int index2)
-
select
MutableCharList select(CharPredicate predicate)
Description copied from interface:CharIterable
Returns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.- Specified by:
select
in interfaceCharIterable
- Specified by:
select
in interfaceCharList
- Specified by:
select
in interfaceMutableCharCollection
- Specified by:
select
in interfaceOrderedCharIterable
- Specified by:
select
in interfaceReversibleCharIterable
-
reject
MutableCharList reject(CharPredicate predicate)
Description copied from interface:CharIterable
Returns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.- Specified by:
reject
in interfaceCharIterable
- Specified by:
reject
in interfaceCharList
- Specified by:
reject
in interfaceMutableCharCollection
- Specified by:
reject
in interfaceOrderedCharIterable
- Specified by:
reject
in interfaceReversibleCharIterable
-
with
MutableCharList with(char element)
- Specified by:
with
in interfaceMutableCharCollection
-
without
MutableCharList without(char element)
- Specified by:
without
in interfaceMutableCharCollection
-
withAll
MutableCharList withAll(CharIterable elements)
- Specified by:
withAll
in interfaceMutableCharCollection
-
withoutAll
MutableCharList withoutAll(CharIterable elements)
- Specified by:
withoutAll
in interfaceMutableCharCollection
-
tap
default MutableCharList tap(CharProcedure procedure)
- Specified by:
tap
in interfaceCharIterable
- Specified by:
tap
in interfaceCharList
- Specified by:
tap
in interfaceMutableCharCollection
- Since:
- 9.0.
-
selectWithIndex
default MutableCharList selectWithIndex(CharIntPredicate predicate)
Returns a new MutableCharList including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndex
in interfaceCharList
- Specified by:
selectWithIndex
in interfaceOrderedCharIterable
- Specified by:
selectWithIndex
in interfaceReversibleCharIterable
- Since:
- 11.1.
-
rejectWithIndex
default MutableCharList rejectWithIndex(CharIntPredicate predicate)
Returns a new MutableCharList excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndex
in interfaceCharList
- Specified by:
rejectWithIndex
in interfaceOrderedCharIterable
- Specified by:
rejectWithIndex
in interfaceReversibleCharIterable
- Since:
- 11.1.
-
collect
<V> MutableList<V> collect(CharToObjectFunction<? extends V> function)
Description copied from interface:CharIterable
Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.- Specified by:
collect
in interfaceCharIterable
- Specified by:
collect
in interfaceCharList
- Specified by:
collect
in interfaceMutableCharCollection
- Specified by:
collect
in interfaceOrderedCharIterable
- Specified by:
collect
in interfaceReversibleCharIterable
-
collectWithIndex
default <V> MutableList<V> collectWithIndex(CharIntToObjectFunction<? extends V> function)
Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndex
in interfaceCharList
- Specified by:
collectWithIndex
in interfaceOrderedCharIterable
- Specified by:
collectWithIndex
in interfaceReversibleCharIterable
- Since:
- 9.1.
-
reverseThis
MutableCharList reverseThis()
-
toReversed
MutableCharList toReversed()
- Specified by:
toReversed
in interfaceCharList
- Specified by:
toReversed
in interfaceReversibleCharIterable
-
distinct
MutableCharList distinct()
- Specified by:
distinct
in interfaceCharList
- Specified by:
distinct
in interfaceReversibleCharIterable
- Since:
- 6.0.
-
sortThis
MutableCharList sortThis()
Sorts this list mutating its contents and returns the same mutable list (this).
-
sortThis
default MutableCharList sortThis(CharComparator comparator)
Sorts the internal data structure of this list and returns the list itself as a convenience.
-
sortThisBy
default <T> MutableCharList sortThisBy(CharToObjectFunction<T> function)
Sorts the internal data structure of this list based on the natural order of the key returned byfunction
.
-
sortThisBy
default <T> MutableCharList sortThisBy(CharToObjectFunction<T> function, java.util.Comparator<? super T> comparator)
Sorts the internal data structure of this list based on the key returned byfunction
using the providedcomparator
.
-
shuffleThis
default MutableCharList shuffleThis()
Randomly permutes this list mutating its contents and returns the same list (this). Usesjava.util.Random
as the source of randomness.
-
shuffleThis
default MutableCharList shuffleThis(java.util.Random rnd)
Randomly permutes this list mutating its contents and returns the same list (this). Implements the Fisher-Yates shuffle algorithm using the provided source of randomness.
-
asUnmodifiable
MutableCharList asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableCharCollection
-
asSynchronized
MutableCharList asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableCharCollection
-
toImmutable
ImmutableCharList toImmutable()
Returns an immutable copy of this list.- Specified by:
toImmutable
in interfaceCharList
- Specified by:
toImmutable
in interfaceMutableCharCollection
-
subList
MutableCharList subList(int fromIndex, int toIndex)
-
zipChar
default MutableList<CharCharPair> zipChar(CharIterable iterable)
Returns aMutableList
formed from thisMutableCharList
and anotherCharList
by combining corresponding elements in pairs. If one of the twoCharList
s is longer than the other, its remaining elements are ignored.
-
zip
default <T> MutableList<CharObjectPair<T>> zip(java.lang.Iterable<T> list)
Returns aMutableList
formed from thisMutableCharList
and aListIterable
by combining corresponding elements in pairs. If one of the two Lists is longer than the other, its remaining elements are ignored.
-
newEmpty
default MutableCharList newEmpty()
Creates a new empty mutable version of the same List type.- Specified by:
newEmpty
in interfaceMutableCharCollection
- Since:
- 9.2.
-
-