Interface MutableCharList
-
- All Superinterfaces:
CharIterable,CharList,MutableCharCollection,OrderedCharIterable,PrimitiveIterable,ReversibleCharIterable
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 booleanaddAllAtIndex(int index, char... source)booleanaddAllAtIndex(int index, CharIterable source)voidaddAtIndex(int index, char element)MutableCharListasSynchronized()MutableCharListasUnmodifiable()MutableList<Character>boxed()<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.MutableCharListdistinct()default MutableCharListnewEmpty()Creates a new empty mutable version of the same List type.MutableCharListreject(CharPredicate predicate)Returns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.default MutableCharListrejectWithIndex(CharIntPredicate predicate)Returns a new MutableCharList excluding all elements with corresponding indexes matching the specified predicate.charremoveAtIndex(int index)MutableCharListreverseThis()MutableCharListselect(CharPredicate predicate)Returns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.default MutableCharListselectWithIndex(CharIntPredicate predicate)Returns a new MutableCharList including all elements with corresponding indexes matching the specified predicate.charset(int index, char element)default MutableCharListshuffleThis()Randomly permutes this list mutating its contents and returns the same list (this).default MutableCharListshuffleThis(Random rnd)Randomly permutes this list mutating its contents and returns the same list (this).MutableCharListsortThis()Sorts this list mutating its contents and returns the same mutable list (this).default MutableCharListsortThis(CharComparator comparator)Sorts the internal data structure of this list and returns the list itself as a convenience.default <T> MutableCharListsortThisBy(CharToObjectFunction<T> function)Sorts the internal data structure of this list based on the natural order of the key returned byfunction.default <T> MutableCharListsortThisBy(CharToObjectFunction<T> function, Comparator<? super T> comparator)Sorts the internal data structure of this list based on the key returned byfunctionusing the providedcomparator.MutableCharListsubList(int fromIndex, int toIndex)default voidswap(int index1, int index2)default MutableCharListtap(CharProcedure procedure)ImmutableCharListtoImmutable()Returns an immutable copy of this list.MutableCharListtoReversed()MutableCharListwith(char element)MutableCharListwithAll(CharIterable elements)MutableCharListwithout(char element)MutableCharListwithoutAll(CharIterable elements)default <T> MutableList<CharObjectPair<T>>zip(Iterable<T> list)Returns aMutableListformed from thisMutableCharListand aListIterableby combining corresponding elements in pairs.default MutableList<CharCharPair>zipChar(CharIterable iterable)Returns aMutableListformed from thisMutableCharListand anotherCharListby 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)
-
boxed
MutableList<Character> boxed()
-
swap
default void swap(int index1, int index2)
-
select
MutableCharList select(CharPredicate predicate)
Description copied from interface:CharIterableReturns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.- Specified by:
selectin interfaceCharIterable- Specified by:
selectin interfaceCharList- Specified by:
selectin interfaceMutableCharCollection- Specified by:
selectin interfaceOrderedCharIterable- Specified by:
selectin interfaceReversibleCharIterable
-
reject
MutableCharList reject(CharPredicate predicate)
Description copied from interface:CharIterableReturns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.- Specified by:
rejectin interfaceCharIterable- Specified by:
rejectin interfaceCharList- Specified by:
rejectin interfaceMutableCharCollection- Specified by:
rejectin interfaceOrderedCharIterable- Specified by:
rejectin interfaceReversibleCharIterable
-
with
MutableCharList with(char element)
- Specified by:
within interfaceMutableCharCollection
-
without
MutableCharList without(char element)
- Specified by:
withoutin interfaceMutableCharCollection
-
withAll
MutableCharList withAll(CharIterable elements)
- Specified by:
withAllin interfaceMutableCharCollection
-
withoutAll
MutableCharList withoutAll(CharIterable elements)
- Specified by:
withoutAllin interfaceMutableCharCollection
-
tap
default MutableCharList tap(CharProcedure procedure)
- Specified by:
tapin interfaceCharIterable- Specified by:
tapin interfaceCharList- Specified by:
tapin 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:
selectWithIndexin interfaceCharList- Specified by:
selectWithIndexin interfaceOrderedCharIterable- Specified by:
selectWithIndexin 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:
rejectWithIndexin interfaceCharList- Specified by:
rejectWithIndexin interfaceOrderedCharIterable- Specified by:
rejectWithIndexin interfaceReversibleCharIterable- Since:
- 11.1.
-
collect
<V> MutableList<V> collect(CharToObjectFunction<? extends V> function)
Description copied from interface:CharIterableReturns 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:
collectin interfaceCharIterable- Specified by:
collectin interfaceCharList- Specified by:
collectin interfaceMutableCharCollection- Specified by:
collectin interfaceOrderedCharIterable- Specified by:
collectin 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:
collectWithIndexin interfaceCharList- Specified by:
collectWithIndexin interfaceOrderedCharIterable- Specified by:
collectWithIndexin interfaceReversibleCharIterable- Since:
- 9.1.
-
reverseThis
MutableCharList reverseThis()
-
toReversed
MutableCharList toReversed()
- Specified by:
toReversedin interfaceCharList- Specified by:
toReversedin interfaceReversibleCharIterable
-
distinct
MutableCharList distinct()
- Specified by:
distinctin interfaceCharList- Specified by:
distinctin 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, Comparator<? super T> comparator)
Sorts the internal data structure of this list based on the key returned byfunctionusing the providedcomparator.
-
shuffleThis
default MutableCharList shuffleThis()
Randomly permutes this list mutating its contents and returns the same list (this). Usesjava.util.Randomas the source of randomness.
-
shuffleThis
default MutableCharList shuffleThis(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:
asUnmodifiablein interfaceMutableCharCollection
-
asSynchronized
MutableCharList asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableCharCollection
-
toImmutable
ImmutableCharList toImmutable()
Returns an immutable copy of this list.- Specified by:
toImmutablein interfaceCharList- Specified by:
toImmutablein interfaceMutableCharCollection
-
subList
MutableCharList subList(int fromIndex, int toIndex)
- Specified by:
subListin interfaceCharList- See Also:
List.subList(int fromIndex, int toIndex)
-
zipChar
default MutableList<CharCharPair> zipChar(CharIterable iterable)
Returns aMutableListformed from thisMutableCharListand anotherCharListby combining corresponding elements in pairs. If one of the twoCharLists is longer than the other, its remaining elements are ignored.
-
zip
default <T> MutableList<CharObjectPair<T>> zip(Iterable<T> list)
Returns aMutableListformed from thisMutableCharListand aListIterableby 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:
newEmptyin interfaceMutableCharCollection- Since:
- 9.2.
-
-