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
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.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.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(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, 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(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, count, detectIfNone, each, flatCollect, forEach, injectInto, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList
Methods inherited from interface org.eclipse.collections.api.list.primitive.CharList
binarySearch, dotProduct, equals, 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
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 Details
-
addAtIndex
void addAtIndex(int index, char element) -
addAllAtIndex
boolean addAllAtIndex(int index, char... source) -
addAllAtIndex
-
removeAtIndex
char removeAtIndex(int index) -
set
char set(int index, char element) -
swap
default void swap(int index1, int index2) -
select
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
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
- Specified by:
with
in interfaceMutableCharCollection
-
without
- Specified by:
without
in interfaceMutableCharCollection
-
withAll
- Specified by:
withAll
in interfaceMutableCharCollection
-
withoutAll
- Specified by:
withoutAll
in interfaceMutableCharCollection
-
tap
- Specified by:
tap
in interfaceCharIterable
- Specified by:
tap
in interfaceCharList
- Specified by:
tap
in interfaceMutableCharCollection
- Since:
- 9.0.
-
collect
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
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
Sorts the internal data structure of this list and returns the list itself as a convenience. -
sortThisBy
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, Comparator<? super T> comparator)Sorts the internal data structure of this list based on the key returned byfunction
using the providedcomparator
. -
shuffleThis
Randomly permutes this list mutating its contents and returns the same list (this). Usesjava.util.Random
as the source of randomness. -
shuffleThis
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
- Specified by:
subList
in interfaceCharList
- See Also:
List.subList(int fromIndex, int toIndex)
-
zipChar
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
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
Creates a new empty mutable version of the same List type.- Specified by:
newEmpty
in interfaceMutableCharCollection
- Since:
- 9.2.
-