Class CharArrayList
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractCharIterable
org.eclipse.collections.impl.list.mutable.primitive.CharArrayList
- All Implemented Interfaces:
Externalizable,Serializable,CharIterable,MutableCharCollection,CharList,MutableCharList,OrderedCharIterable,ReversibleCharIterable,PrimitiveIterable
CharArrayList is similar to FastList, and is memory-optimized for char primitives.
This file was automatically generated from template file primitiveArrayList.stg.
- Since:
- 3.0.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(char newItem) booleanaddAll(char... source) booleanaddAll(CharIterable source) booleanaddAllAtIndex(int index, char... source) booleanaddAllAtIndex(int index, CharIterable source) voidaddAtIndex(int index, char element) booleanallSatisfy(CharPredicate predicate) booleananySatisfy(CharPredicate predicate) voidappendString(Appendable appendable, String start, String separator, String end) intbinarySearch(char value) boxed()chunk(int size) voidclear()<V> MutableList<V>collect(CharToObjectFunction<? extends V> function) <V,R extends Collection<V>>
Rcollect(CharToObjectFunction<? extends V> function, R target) booleancontains(char value) intcount(CharPredicate predicate) chardetectIfNone(CharPredicate predicate, char ifNone) distinct()longdotProduct(CharList list) voideach(CharProcedure procedure) voidensureCapacity(int minCapacity) booleanvoidforEachWithIndex(CharIntProcedure procedure) charget(int index) chargetFirst()chargetLast()inthashCode()intindexOf(char value) <T> TinjectInto(T injectedValue, ObjectCharToObjectFunction<? super T, ? extends T> function) <T> TinjectIntoWithIndex(T injectedValue, ObjectCharIntToObjectFunction<? super T, ? extends T> function) intlastIndexOf(char value) charmax()charmin()newEmpty()Creates a new empty CharArrayList.static CharArrayListnewList(CharIterable source) static CharArrayListnewListWith(char... elements) Creates a new list using the passedelementsargument as the backing store.static CharArrayListnewWithNValues(int size, char value) voidreject(CharPredicate predicate) <R extends MutableCharCollection>
Rreject(CharPredicate predicate, R target) booleanremove(char value) booleanremoveAll(char... source) booleanremoveAll(CharIterable source) charremoveAtIndex(int index) booleanremoveIf(CharPredicate predicate) booleanretainAll(char... source) booleanretainAll(CharIterable source) select(CharPredicate predicate) <R extends MutableCharCollection>
Rselect(CharPredicate predicate, R target) charset(int index, char element) intsize()sortThis()sortThis(CharComparator comparator) subList(int fromIndex, int toIndex) longsum()voidswap(int index1, int index2) char[]toArray()char[]toArray(char[] target) toStack()voidwith(char element) with(char element1, char element2) with(char element1, char element2, char element3) with(char element1, char element2, char element3, char... elements) withAll(CharIterable elements) without(char element) withoutAll(CharIterable elements) static CharArrayListwrapCopy(char... array) Creates a new list by first copying the array passed in.void<T> MutableList<CharObjectPair<T>>zipChar(CharIterable iterable) Methods inherited from class org.eclipse.collections.impl.primitive.AbstractCharIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods inherited from interface org.eclipse.collections.api.CharIterable
asLazy, average, averageIfEmpty, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, maxIfEmpty, median, medianIfEmpty, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByMethods inherited from interface org.eclipse.collections.api.list.primitive.CharList
forEachInBothMethods inherited from interface org.eclipse.collections.api.list.primitive.MutableCharList
collectWithIndex, rejectWithIndex, selectWithIndex, shuffleThis, shuffleThis, sortThisBy, sortThisBy, tapMethods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedCharIterable
collectWithIndex, rejectWithIndex, selectWithIndexMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
-
Constructor Details
-
CharArrayList
public CharArrayList() -
CharArrayList
public CharArrayList(int initialCapacity) -
CharArrayList
public CharArrayList(char... array)
-
-
Method Details
-
newListWith
Creates a new list using the passedelementsargument as the backing store.!!! WARNING: This method uses the passed in array, so can be very unsafe if the original array is held onto anywhere else. !!!
-
newList
-
newWithNValues
-
wrapCopy
Creates a new list by first copying the array passed in. -
size
public int size()- Specified by:
sizein interfacePrimitiveIterable
-
clear
public void clear()- Specified by:
clearin interfaceMutableCharCollection
-
contains
public boolean contains(char value) - Specified by:
containsin interfaceCharIterable
-
get
public char get(int index) -
getFirst
public char getFirst()- Specified by:
getFirstin interfaceOrderedCharIterable
-
getLast
public char getLast()- Specified by:
getLastin interfaceReversibleCharIterable
-
indexOf
public int indexOf(char value) - Specified by:
indexOfin interfaceOrderedCharIterable
-
lastIndexOf
public int lastIndexOf(char value) - Specified by:
lastIndexOfin interfaceCharList
-
trimToSize
public void trimToSize() -
ensureCapacity
public void ensureCapacity(int minCapacity) -
add
public boolean add(char newItem) - Specified by:
addin interfaceMutableCharCollection
-
addAll
public boolean addAll(char... source) - Specified by:
addAllin interfaceMutableCharCollection
-
addAll
- Specified by:
addAllin interfaceMutableCharCollection
-
addAtIndex
public void addAtIndex(int index, char element) - Specified by:
addAtIndexin interfaceMutableCharList
-
addAllAtIndex
public boolean addAllAtIndex(int index, char... source) - Specified by:
addAllAtIndexin interfaceMutableCharList
-
addAllAtIndex
- Specified by:
addAllAtIndexin interfaceMutableCharList
-
remove
public boolean remove(char value) - Specified by:
removein interfaceMutableCharCollection
-
removeIf
- Specified by:
removeIfin interfaceMutableCharCollection
-
removeAll
- Specified by:
removeAllin interfaceMutableCharCollection
-
removeAll
public boolean removeAll(char... source) - Specified by:
removeAllin interfaceMutableCharCollection
-
retainAll
- Specified by:
retainAllin interfaceMutableCharCollection
-
retainAll
public boolean retainAll(char... source) - Specified by:
retainAllin interfaceMutableCharCollection
-
removeAtIndex
public char removeAtIndex(int index) - Specified by:
removeAtIndexin interfaceMutableCharList
-
set
public char set(int index, char element) - Specified by:
setin interfaceMutableCharList
-
swap
public void swap(int index1, int index2) - Specified by:
swapin interfaceMutableCharList
-
with
- Specified by:
within interfaceMutableCharCollection- Specified by:
within interfaceMutableCharList
-
without
- Specified by:
withoutin interfaceMutableCharCollection- Specified by:
withoutin interfaceMutableCharList
-
withAll
- Specified by:
withAllin interfaceMutableCharCollection- Specified by:
withAllin interfaceMutableCharList
-
withoutAll
- Specified by:
withoutAllin interfaceMutableCharCollection- Specified by:
withoutAllin interfaceMutableCharList
-
with
-
with
-
with
-
charIterator
- Specified by:
charIteratorin interfaceCharIterable- Specified by:
charIteratorin interfaceMutableCharCollection
-
each
- Specified by:
eachin interfaceCharIterable- Since:
- 7.0.
-
forEachWithIndex
- Specified by:
forEachWithIndexin interfaceOrderedCharIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectCharToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoin interfaceCharIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectCharIntToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoWithIndexin interfaceOrderedCharIterable- Specified by:
injectIntoWithIndexin interfaceReversibleCharIterable
-
chunk
- Specified by:
chunkin interfaceCharIterable
-
count
- Specified by:
countin interfaceCharIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceCharIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceCharIterable
-
select
- Specified by:
selectin interfaceCharIterable- Specified by:
selectin interfaceCharList- Specified by:
selectin interfaceMutableCharCollection- Specified by:
selectin interfaceMutableCharList- Specified by:
selectin interfaceOrderedCharIterable- Specified by:
selectin interfaceReversibleCharIterable
-
select
- Specified by:
selectin interfaceCharIterable- Since:
- 8.1.
-
reject
- Specified by:
rejectin interfaceCharIterable- Specified by:
rejectin interfaceCharList- Specified by:
rejectin interfaceMutableCharCollection- Specified by:
rejectin interfaceMutableCharList- Specified by:
rejectin interfaceOrderedCharIterable- Specified by:
rejectin interfaceReversibleCharIterable
-
reject
- Specified by:
rejectin interfaceCharIterable- Since:
- 8.1.
-
detectIfNone
- Specified by:
detectIfNonein interfaceCharIterable
-
collect
- Specified by:
collectin interfaceCharIterable- Specified by:
collectin interfaceCharList- Specified by:
collectin interfaceMutableCharCollection- Specified by:
collectin interfaceMutableCharList- Specified by:
collectin interfaceOrderedCharIterable- Specified by:
collectin interfaceReversibleCharIterable
-
collect
- Specified by:
collectin interfaceCharIterable- Since:
- 8.1.
-
max
public char max()- Specified by:
maxin interfaceCharIterable
-
min
public char min()- Specified by:
minin interfaceCharIterable
-
sum
public long sum()- Specified by:
sumin interfaceCharIterable
-
dotProduct
- Specified by:
dotProductin interfaceCharList
-
toArray
public char[] toArray()- Specified by:
toArrayin interfaceCharIterable
-
toArray
public char[] toArray(char[] target) - Specified by:
toArrayin interfaceCharIterable
-
equals
-
hashCode
public int hashCode() -
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableCharCollection- Specified by:
asUnmodifiablein interfaceMutableCharList
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableCharCollection- Specified by:
asSynchronizedin interfaceMutableCharList
-
toImmutable
- Specified by:
toImmutablein interfaceCharList- Specified by:
toImmutablein interfaceMutableCharCollection- Specified by:
toImmutablein interfaceMutableCharList
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-
asReversed
- Specified by:
asReversedin interfaceReversibleCharIterable
-
reverseThis
- Specified by:
reverseThisin interfaceMutableCharList
-
sortThis
- Specified by:
sortThisin interfaceMutableCharList
-
sortThis
- Specified by:
sortThisin interfaceMutableCharList
-
toReversed
- Specified by:
toReversedin interfaceCharList- Specified by:
toReversedin interfaceMutableCharList- Specified by:
toReversedin interfaceReversibleCharIterable
-
binarySearch
public int binarySearch(char value) - Specified by:
binarySearchin interfaceCharList
-
distinct
- Specified by:
distinctin interfaceCharList- Specified by:
distinctin interfaceMutableCharList- Specified by:
distinctin interfaceReversibleCharIterable
-
subList
- Specified by:
subListin interfaceCharList- Specified by:
subListin interfaceMutableCharList
-
zipChar
- Specified by:
zipCharin interfaceCharList- Specified by:
zipCharin interfaceMutableCharList- Since:
- 9.1.
-
newEmpty
Creates a new empty CharArrayList.- Specified by:
newEmptyin interfaceMutableCharCollection- Specified by:
newEmptyin interfaceMutableCharList- Since:
- 9.2.
-
zip
- Specified by:
zipin interfaceCharList- Specified by:
zipin interfaceMutableCharList- Since:
- 9.1.
-
boxed
- Specified by:
boxedin interfaceMutableCharList
-
toStack
- Specified by:
toStackin interfaceOrderedCharIterable
-