public class CharArrayList extends AbstractCharIterable implements MutableCharList, Externalizable
| Constructor and Description |
|---|
CharArrayList() |
CharArrayList(char... array) |
CharArrayList(int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(char newItem) |
boolean |
addAll(char... source) |
boolean |
addAll(CharIterable source) |
boolean |
addAllAtIndex(int index,
char... source) |
boolean |
addAllAtIndex(int index,
CharIterable source) |
void |
addAtIndex(int index,
char element) |
boolean |
allSatisfy(CharPredicate predicate) |
boolean |
anySatisfy(CharPredicate predicate) |
void |
appendString(Appendable appendable,
String start,
String separator,
String end) |
LazyCharIterable |
asReversed() |
MutableCharList |
asSynchronized() |
MutableCharList |
asUnmodifiable() |
int |
binarySearch(char value) |
MutableCharIterator |
charIterator() |
RichIterable<CharIterable> |
chunk(int size) |
void |
clear() |
<V> MutableList<V> |
collect(CharToObjectFunction<? extends V> function) |
<V,R extends Collection<V>> |
collect(CharToObjectFunction<? extends V> function,
R target) |
boolean |
contains(char value) |
int |
count(CharPredicate predicate) |
char |
detectIfNone(CharPredicate predicate,
char ifNone) |
MutableCharList |
distinct() |
long |
dotProduct(CharList list) |
void |
each(CharProcedure procedure) |
void |
ensureCapacity(int minCapacity) |
boolean |
equals(Object otherList) |
void |
forEachWithIndex(CharIntProcedure procedure) |
char |
get(int index) |
char |
getFirst() |
char |
getLast() |
int |
hashCode() |
int |
indexOf(char value) |
<T> T |
injectInto(T injectedValue,
ObjectCharToObjectFunction<? super T,? extends T> function) |
<T> T |
injectIntoWithIndex(T injectedValue,
ObjectCharIntToObjectFunction<? super T,? extends T> function) |
int |
lastIndexOf(char value) |
char |
max() |
char |
min() |
CharArrayList |
newEmpty()
Creates a new empty CharArrayList.
|
static CharArrayList |
newList(CharIterable source) |
static CharArrayList |
newListWith(char... elements)
Creates a new list using the passed
elements argument as the backing store. |
static CharArrayList |
newWithNValues(int size,
char value) |
void |
readExternal(ObjectInput in) |
CharArrayList |
reject(CharPredicate predicate) |
<R extends MutableCharCollection> |
reject(CharPredicate predicate,
R target) |
boolean |
remove(char value) |
boolean |
removeAll(char... source) |
boolean |
removeAll(CharIterable source) |
char |
removeAtIndex(int index) |
boolean |
removeIf(CharPredicate predicate) |
boolean |
retainAll(char... source) |
boolean |
retainAll(CharIterable source) |
CharArrayList |
reverseThis() |
CharArrayList |
select(CharPredicate predicate) |
<R extends MutableCharCollection> |
select(CharPredicate predicate,
R target) |
char |
set(int index,
char element) |
int |
size() |
CharArrayList |
sortThis() |
CharArrayList |
sortThis(CharComparator comparator) |
MutableCharList |
subList(int fromIndex,
int toIndex) |
long |
sum() |
void |
swap(int index1,
int index2) |
char[] |
toArray() |
char[] |
toArray(char[] target) |
ImmutableCharList |
toImmutable() |
CharArrayList |
toReversed() |
void |
trimToSize() |
CharArrayList |
with(char element) |
CharArrayList |
with(char element1,
char element2) |
CharArrayList |
with(char element1,
char element2,
char element3) |
CharArrayList |
with(char element1,
char element2,
char element3,
char... elements) |
CharArrayList |
withAll(CharIterable elements) |
CharArrayList |
without(char element) |
CharArrayList |
withoutAll(CharIterable elements) |
static CharArrayList |
wrapCopy(char... array)
Creates a new list by first copying the array passed in.
|
void |
writeExternal(ObjectOutput out) |
<T> MutableList<CharObjectPair<T>> |
zip(Iterable<T> iterable) |
MutableList<CharCharPair> |
zipChar(CharIterable iterable) |
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringcollectWithIndex, rejectWithIndex, selectWithIndex, shuffleThis, shuffleThis, sortThisBy, sortThisBy, tapforEachInBothcollectWithIndex, rejectWithIndex, selectWithIndexasLazy, 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, toSortedListByappendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toStringpublic CharArrayList()
public CharArrayList(int initialCapacity)
public CharArrayList(char... array)
public static CharArrayList newListWith(char... elements)
elements argument 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. !!!
public static CharArrayList newList(CharIterable source)
public static CharArrayList newWithNValues(int size, char value)
public static CharArrayList wrapCopy(char... array)
public int size()
size in interface PrimitiveIterablepublic void clear()
clear in interface MutableCharCollectionpublic boolean contains(char value)
contains in interface CharIterablepublic char getFirst()
getFirst in interface OrderedCharIterablepublic char getLast()
getLast in interface ReversibleCharIterablepublic int indexOf(char value)
indexOf in interface OrderedCharIterablepublic int lastIndexOf(char value)
lastIndexOf in interface CharListpublic void trimToSize()
public void ensureCapacity(int minCapacity)
public boolean add(char newItem)
add in interface MutableCharCollectionpublic boolean addAll(char... source)
addAll in interface MutableCharCollectionpublic boolean addAll(CharIterable source)
addAll in interface MutableCharCollectionpublic void addAtIndex(int index,
char element)
addAtIndex in interface MutableCharListpublic boolean addAllAtIndex(int index,
char... source)
addAllAtIndex in interface MutableCharListpublic boolean addAllAtIndex(int index,
CharIterable source)
addAllAtIndex in interface MutableCharListpublic boolean remove(char value)
remove in interface MutableCharCollectionpublic boolean removeIf(CharPredicate predicate)
removeIf in interface MutableCharCollectionpublic boolean removeAll(CharIterable source)
removeAll in interface MutableCharCollectionpublic boolean removeAll(char... source)
removeAll in interface MutableCharCollectionpublic boolean retainAll(CharIterable source)
retainAll in interface MutableCharCollectionpublic boolean retainAll(char... source)
retainAll in interface MutableCharCollectionpublic char removeAtIndex(int index)
removeAtIndex in interface MutableCharListpublic char set(int index,
char element)
set in interface MutableCharListpublic void swap(int index1,
int index2)
swap in interface MutableCharListpublic CharArrayList with(char element)
with in interface MutableCharCollectionwith in interface MutableCharListpublic CharArrayList without(char element)
without in interface MutableCharCollectionwithout in interface MutableCharListpublic CharArrayList withAll(CharIterable elements)
withAll in interface MutableCharCollectionwithAll in interface MutableCharListpublic CharArrayList withoutAll(CharIterable elements)
withoutAll in interface MutableCharCollectionwithoutAll in interface MutableCharListpublic CharArrayList with(char element1, char element2)
public CharArrayList with(char element1, char element2, char element3)
public CharArrayList with(char element1, char element2, char element3, char... elements)
public MutableCharIterator charIterator()
charIterator in interface CharIterablecharIterator in interface MutableCharCollectionpublic void each(CharProcedure procedure)
each in interface CharIterablepublic void forEachWithIndex(CharIntProcedure procedure)
forEachWithIndex in interface OrderedCharIterablepublic <T> T injectInto(T injectedValue,
ObjectCharToObjectFunction<? super T,? extends T> function)
injectInto in interface CharIterablepublic <T> T injectIntoWithIndex(T injectedValue,
ObjectCharIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex in interface OrderedCharIterableinjectIntoWithIndex in interface ReversibleCharIterablepublic RichIterable<CharIterable> chunk(int size)
chunk in interface CharIterablepublic int count(CharPredicate predicate)
count in interface CharIterablepublic boolean anySatisfy(CharPredicate predicate)
anySatisfy in interface CharIterablepublic boolean allSatisfy(CharPredicate predicate)
allSatisfy in interface CharIterablepublic CharArrayList select(CharPredicate predicate)
select in interface CharIterableselect in interface MutableCharCollectionselect in interface CharListselect in interface MutableCharListselect in interface OrderedCharIterableselect in interface ReversibleCharIterablepublic <R extends MutableCharCollection> R select(CharPredicate predicate, R target)
select in interface CharIterablepublic CharArrayList reject(CharPredicate predicate)
reject in interface CharIterablereject in interface MutableCharCollectionreject in interface CharListreject in interface MutableCharListreject in interface OrderedCharIterablereject in interface ReversibleCharIterablepublic <R extends MutableCharCollection> R reject(CharPredicate predicate, R target)
reject in interface CharIterablepublic char detectIfNone(CharPredicate predicate, char ifNone)
detectIfNone in interface CharIterablepublic <V> MutableList<V> collect(CharToObjectFunction<? extends V> function)
collect in interface CharIterablecollect in interface MutableCharCollectioncollect in interface CharListcollect in interface MutableCharListcollect in interface OrderedCharIterablecollect in interface ReversibleCharIterablepublic <V,R extends Collection<V>> R collect(CharToObjectFunction<? extends V> function, R target)
collect in interface CharIterablepublic char max()
max in interface CharIterablepublic char min()
min in interface CharIterablepublic long sum()
sum in interface CharIterablepublic long dotProduct(CharList list)
dotProduct in interface CharListpublic char[] toArray()
toArray in interface CharIterablepublic char[] toArray(char[] target)
toArray in interface CharIterablepublic boolean equals(Object otherList)
public int hashCode()
public void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface PrimitiveIterablepublic MutableCharList asUnmodifiable()
asUnmodifiable in interface MutableCharCollectionasUnmodifiable in interface MutableCharListpublic MutableCharList asSynchronized()
asSynchronized in interface MutableCharCollectionasSynchronized in interface MutableCharListpublic ImmutableCharList toImmutable()
toImmutable in interface MutableCharCollectiontoImmutable in interface CharListtoImmutable in interface MutableCharListpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizableIOExceptionpublic LazyCharIterable asReversed()
asReversed in interface ReversibleCharIterablepublic CharArrayList reverseThis()
reverseThis in interface MutableCharListpublic CharArrayList sortThis()
sortThis in interface MutableCharListpublic CharArrayList sortThis(CharComparator comparator)
sortThis in interface MutableCharListpublic CharArrayList toReversed()
toReversed in interface CharListtoReversed in interface MutableCharListtoReversed in interface ReversibleCharIterablepublic int binarySearch(char value)
binarySearch in interface CharListpublic MutableCharList distinct()
distinct in interface CharListdistinct in interface MutableCharListdistinct in interface ReversibleCharIterablepublic MutableCharList subList(int fromIndex, int toIndex)
subList in interface CharListsubList in interface MutableCharListpublic MutableList<CharCharPair> zipChar(CharIterable iterable)
zipChar in interface CharListzipChar in interface MutableCharListpublic CharArrayList newEmpty()
newEmpty in interface MutableCharCollectionnewEmpty in interface MutableCharListpublic <T> MutableList<CharObjectPair<T>> zip(Iterable<T> iterable)
zip in interface CharListzip in interface MutableCharListCopyright © 2004–2022. All rights reserved.