Class UnmodifiableCharList
java.lang.Object
org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableCharCollection
org.eclipse.collections.impl.list.mutable.primitive.UnmodifiableCharList
- All Implemented Interfaces:
Serializable
,CharIterable
,MutableCharCollection
,CharList
,MutableCharList
,OrderedCharIterable
,ReversibleCharIterable
,PrimitiveIterable
public class UnmodifiableCharList
extends AbstractUnmodifiableCharCollection
implements MutableCharList
This file was automatically generated from template file unmodifiablePrimitiveList.stg.
- Since:
- 3.1.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addAllAtIndex
(int index, char... source) boolean
addAllAtIndex
(int index, CharIterable source) void
addAtIndex
(int index, char element) int
binarySearch
(char value) <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.<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.<V,
R extends Collection<V>>
RcollectWithIndex
(CharIntToObjectFunction<? extends V> function, R target) Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.distinct()
long
dotProduct
(CharList list) boolean
Follows the same general contract asList.equals(Object)
.void
forEachWithIndex
(CharIntProcedure procedure) char
get
(int index) char
getFirst()
char
getLast()
int
hashCode()
Follows the same general contract asList.hashCode()
.int
indexOf
(char value) <T> T
injectIntoWithIndex
(T injectedValue, ObjectCharIntToObjectFunction<? super T, ? extends T> function) int
lastIndexOf
(char value) newEmpty()
Creates a new empty mutable version of the same List type.reject
(CharPredicate predicate) Returns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.rejectWithIndex
(CharIntPredicate predicate) Returns a new MutableCharList excluding all elements with corresponding indexes matching the specified predicate.<R extends MutableCharCollection>
RrejectWithIndex
(CharIntPredicate predicate, R target) Returns a new MutableCharCollection excluding all elements with corresponding indexes matching the specified predicate.char
removeAtIndex
(int index) select
(CharPredicate predicate) Returns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.selectWithIndex
(CharIntPredicate predicate) Returns a new MutableCharList including all elements with corresponding indexes matching the specified predicate.<R extends MutableCharCollection>
RselectWithIndex
(CharIntPredicate predicate, R target) Returns a new MutableCharCollection including all elements with corresponding indexes matching the specified predicate.char
set
(int index, char element) Randomly permutes this list mutating its contents and returns the same list (this).sortThis()
Sorts this list mutating its contents and returns the same mutable list (this).subList
(int fromIndex, int toIndex) Returns an immutable copy of this list.with
(char element) withAll
(CharIterable elements) without
(char element) withoutAll
(CharIterable elements) <T> MutableList<CharObjectPair<T>>
Returns aMutableList
formed from thisMutableCharList
and aListIterable
by combining corresponding elements in pairs.zipChar
(CharIterable iterable) Returns aMutableList
formed from thisMutableCharList
and anotherCharList
by combining corresponding elements in pairs.Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableCharCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, charIterator, chunk, clear, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, injectInto, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, reduce, reduceIfEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, size, sum, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toString
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
forEachInBoth
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.list.primitive.MutableCharList
shuffleThis, sortThis, sortThisBy, sortThisBy, swap, tap
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
Constructor Details
-
UnmodifiableCharList
-
-
Method Details
-
get
public char get(int index) -
getFirst
public char getFirst()- Specified by:
getFirst
in interfaceOrderedCharIterable
-
getLast
public char getLast()- Specified by:
getLast
in interfaceReversibleCharIterable
-
indexOf
public int indexOf(char value) - Specified by:
indexOf
in interfaceOrderedCharIterable
-
lastIndexOf
public int lastIndexOf(char value) - Specified by:
lastIndexOf
in interfaceCharList
-
addAtIndex
public void addAtIndex(int index, char element) - Specified by:
addAtIndex
in interfaceMutableCharList
-
addAllAtIndex
public boolean addAllAtIndex(int index, char... source) - Specified by:
addAllAtIndex
in interfaceMutableCharList
-
addAllAtIndex
- Specified by:
addAllAtIndex
in interfaceMutableCharList
-
removeAtIndex
public char removeAtIndex(int index) - Specified by:
removeAtIndex
in interfaceMutableCharList
-
set
public char set(int index, char element) - Specified by:
set
in interfaceMutableCharList
-
with
- Specified by:
with
in interfaceMutableCharCollection
- Specified by:
with
in interfaceMutableCharList
- Overrides:
with
in classAbstractUnmodifiableCharCollection
-
without
- Specified by:
without
in interfaceMutableCharCollection
- Specified by:
without
in interfaceMutableCharList
- Overrides:
without
in classAbstractUnmodifiableCharCollection
-
withAll
- Specified by:
withAll
in interfaceMutableCharCollection
- Specified by:
withAll
in interfaceMutableCharList
- Overrides:
withAll
in classAbstractUnmodifiableCharCollection
-
withoutAll
- Specified by:
withoutAll
in interfaceMutableCharCollection
- Specified by:
withoutAll
in interfaceMutableCharList
- Overrides:
withoutAll
in classAbstractUnmodifiableCharCollection
-
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 interfaceMutableCharList
- Specified by:
select
in interfaceOrderedCharIterable
- Specified by:
select
in interfaceReversibleCharIterable
- Overrides:
select
in classAbstractUnmodifiableCharCollection
-
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 interfaceMutableCharList
- Specified by:
reject
in interfaceOrderedCharIterable
- Specified by:
reject
in interfaceReversibleCharIterable
- Overrides:
reject
in classAbstractUnmodifiableCharCollection
-
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 interfaceMutableCharList
- Specified by:
collect
in interfaceOrderedCharIterable
- Specified by:
collect
in interfaceReversibleCharIterable
- Overrides:
collect
in classAbstractUnmodifiableCharCollection
-
sortThis
Description copied from interface:MutableCharList
Sorts this list mutating its contents and returns the same mutable list (this).- Specified by:
sortThis
in interfaceMutableCharList
-
shuffleThis
Description copied from interface:MutableCharList
Randomly permutes this list mutating its contents and returns the same list (this). Usesjava.util.Random
as the source of randomness.- Specified by:
shuffleThis
in interfaceMutableCharList
-
binarySearch
public int binarySearch(char value) - Specified by:
binarySearch
in interfaceCharList
-
dotProduct
- Specified by:
dotProduct
in interfaceCharList
-
equals
Description copied from interface:CharList
Follows the same general contract asList.equals(Object)
. -
hashCode
public int hashCode()Description copied from interface:CharList
Follows the same general contract asList.hashCode()
. -
asUnmodifiable
- Specified by:
asUnmodifiable
in interfaceMutableCharCollection
- Specified by:
asUnmodifiable
in interfaceMutableCharList
- Overrides:
asUnmodifiable
in classAbstractUnmodifiableCharCollection
-
asSynchronized
- Specified by:
asSynchronized
in interfaceMutableCharCollection
- Specified by:
asSynchronized
in interfaceMutableCharList
- Overrides:
asSynchronized
in classAbstractUnmodifiableCharCollection
-
toImmutable
Description copied from interface:MutableCharList
Returns an immutable copy of this list.- Specified by:
toImmutable
in interfaceCharList
- Specified by:
toImmutable
in interfaceMutableCharCollection
- Specified by:
toImmutable
in interfaceMutableCharList
- Overrides:
toImmutable
in classAbstractUnmodifiableCharCollection
-
newEmpty
Description copied from interface:MutableCharList
Creates a new empty mutable version of the same List type.- Specified by:
newEmpty
in interfaceMutableCharCollection
- Specified by:
newEmpty
in interfaceMutableCharList
- Since:
- 9.2.
-
reverseThis
- Specified by:
reverseThis
in interfaceMutableCharList
-
toReversed
- Specified by:
toReversed
in interfaceCharList
- Specified by:
toReversed
in interfaceMutableCharList
- Specified by:
toReversed
in interfaceReversibleCharIterable
-
forEachWithIndex
- Specified by:
forEachWithIndex
in interfaceOrderedCharIterable
-
asReversed
- Specified by:
asReversed
in interfaceReversibleCharIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectCharIntToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoWithIndex
in interfaceOrderedCharIterable
- Specified by:
injectIntoWithIndex
in interfaceReversibleCharIterable
-
distinct
- Specified by:
distinct
in interfaceCharList
- Specified by:
distinct
in interfaceMutableCharList
- Specified by:
distinct
in interfaceReversibleCharIterable
- Since:
- 6.0.
-
subList
- Specified by:
subList
in interfaceCharList
- Specified by:
subList
in interfaceMutableCharList
- See Also:
-
zipChar
Description copied from interface:MutableCharList
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.- Specified by:
zipChar
in interfaceCharList
- Specified by:
zipChar
in interfaceMutableCharList
- Since:
- 9.1.
-
zip
Description copied from interface:MutableCharList
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.- Specified by:
zip
in interfaceCharList
- Specified by:
zip
in interfaceMutableCharList
- Since:
- 9.1.
-
selectWithIndex
Returns a new MutableCharList including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndex
in interfaceCharList
- Specified by:
selectWithIndex
in interfaceMutableCharList
- Specified by:
selectWithIndex
in interfaceOrderedCharIterable
- Specified by:
selectWithIndex
in interfaceReversibleCharIterable
- Since:
- 11.1.
-
selectWithIndex
Returns a new MutableCharCollection including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndex
in interfaceOrderedCharIterable
- Since:
- 11.1.
-
rejectWithIndex
Returns a new MutableCharList excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndex
in interfaceCharList
- Specified by:
rejectWithIndex
in interfaceMutableCharList
- Specified by:
rejectWithIndex
in interfaceOrderedCharIterable
- Specified by:
rejectWithIndex
in interfaceReversibleCharIterable
- Since:
- 11.1.
-
rejectWithIndex
Returns a new MutableCharCollection excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndex
in interfaceOrderedCharIterable
- Since:
- 11.1.
-
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 interfaceMutableCharList
- Specified by:
collectWithIndex
in interfaceOrderedCharIterable
- Specified by:
collectWithIndex
in interfaceReversibleCharIterable
- Since:
- 9.1.
-
collectWithIndex
public <V,R extends Collection<V>> R collectWithIndex(CharIntToObjectFunction<? extends V> function, R target) Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndex
in interfaceOrderedCharIterable
- Since:
- 9.1.
-