Top Description Inners Fields Constructors Methods
org.eclipse.collections.impl.list.mutable.primitive

public Class CharArrayList

extends AbstractCharIterable
implements MutableCharList, Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable, org.eclipse.collections.api.list.primitive.MutableCharList, org.eclipse.collections.api.list.primitive.CharList, org.eclipse.collections.api.ordered.primitive.ReversibleCharIterable, org.eclipse.collections.api.ordered.primitive.OrderedCharIterable, org.eclipse.collections.api.CharIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.MutableCharCollection
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, java.util.Arrays, .Collection, .Iterator, .NoSuchElementException, org.eclipse.collections.api.CharIterable, .LazyCharIterable, .RichIterable, org.eclipse.collections.api.block.comparator.primitive.CharComparator, org.eclipse.collections.api.block.function.primitive.ObjectCharIntToObjectFunction, .ObjectCharToObjectFunction, .CharToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.CharPredicate, org.eclipse.collections.api.block.procedure.primitive.CharIntProcedure, .CharProcedure, org.eclipse.collections.api.collection.primitive.MutableCharCollection, org.eclipse.collections.api.factory.Lists, org.eclipse.collections.api.iterator.MutableCharIterator, .CharIterator, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.list.primitive.CharList, .ImmutableCharList, .MutableCharList, org.eclipse.collections.api.set.primitive.CharSet, .MutableCharSet, org.eclipse.collections.api.stack.primitive.MutableCharStack, org.eclipse.collections.api.tuple.primitive.CharCharPair, .CharObjectPair, org.eclipse.collections.impl.factory.primitive.CharLists, .CharStacks, org.eclipse.collections.impl.lazy.primitive.ReverseCharIterable, org.eclipse.collections.impl.primitive.AbstractCharIterable, org.eclipse.collections.impl.set.mutable.primitive.CharHashSet, org.eclipse.collections.impl.tuple.primitive.PrimitiveTuples, org.eclipse.collections.impl.utility.Iterate, org.eclipse.collections.impl.utility.primitive.CharQuickSort

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.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private static final char[]
protected transient char[]
private static final int
private static final long
protected int
private static final char[]

Constructor Summary

AccessConstructor and Description
public
public
CharArrayList(int initialCapacity)

public
CharArrayList(char... array)

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public boolean
public boolean
public boolean
public void
private void
addAtIndexLessThanSize(int index, char element)

public boolean
allSatisfy(CharPredicate predicate)

Implements org.eclipse.collections.api.CharIterable.allSatisfy.

Returns true if all of the elements in the CharIterable return true for the specified predicate, otherwise returns false.

public boolean
anySatisfy(CharPredicate predicate)

Implements org.eclipse.collections.api.CharIterable.anySatisfy.

Returns true if any of the elements in the CharIterable return true for the specified predicate, otherwise returns false.

public void
appendString(Appendable appendable, String start, String separator, String end)

Implements org.eclipse.collections.api.PrimitiveIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public LazyCharIterable
public MutableCharList
public MutableCharList
public int
public MutableList<Character>
public MutableCharIterator
charIterator()

Implements org.eclipse.collections.api.collection.primitive.MutableCharCollection.charIterator, org.eclipse.collections.api.CharIterable.charIterator.

Returns a primitive iterator that can be used to iterate over the CharIterable in an imperative style.

private void
public RichIterable<CharIterable>
chunk(int size)

Overrides default org.eclipse.collections.api.CharIterable.chunk.

Partitions elements in fixed size chunks.

public void
public <V> MutableList<V>
collect(CharToObjectFunction<? extends V> function)

Implements org.eclipse.collections.api.list.primitive.MutableCharList.collect, org.eclipse.collections.api.CharIterable.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection.

public <V, R extends Collection<V>> R
collect(CharToObjectFunction<? extends V> function, R target)

Overrides default org.eclipse.collections.api.CharIterable.collect.

Same as collect(CharToObjectFunction) , only the results are added to the target Collection.

public boolean
contains(char value)

Implements org.eclipse.collections.api.CharIterable.contains.

Returns true if the value is contained in the CharIterable, and false if it is not.

private void
copyItems(int sourceSize, char[] source)

private char[]
copyItemsWithNewCapacity(int newCapacity)

public int
count(CharPredicate predicate)

Implements org.eclipse.collections.api.CharIterable.count.

Returns a count of the number of elements in the CharIterable that return true for the specified predicate.

public char
public MutableCharList
public long
public void
each(CharProcedure procedure)

Implements org.eclipse.collections.api.CharIterable.each.

A synonym for forEach.

public void
ensureCapacity(int minCapacity)

private void
public boolean
public void
public char
public char
public char
public int
public int
public <T> T
injectInto(T injectedValue, ObjectCharToObjectFunction<? super T, ? extends T> function)

Implements org.eclipse.collections.api.CharIterable.injectInto.

public <T> T
public int
public char
public char
public CharArrayList
newEmpty()

Overrides default org.eclipse.collections.api.list.primitive.MutableCharList.newEmpty.

Creates a new empty CharArrayList.

private IndexOutOfBoundsException
public static CharArrayList
public static CharArrayList
newListWith(char... elements)

Creates a new list using the passed elements argument as the backing store.

public static CharArrayList
newWithNValues(int size, char value)

public void
readExternal(ObjectInput in)

Implements java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.

public CharArrayList
reject(CharPredicate predicate)

Implements org.eclipse.collections.api.list.primitive.MutableCharList.reject, org.eclipse.collections.api.CharIterable.reject.

Returns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.

public <R extends MutableCharCollection> R
reject(CharPredicate predicate, R target)

Overrides default org.eclipse.collections.api.CharIterable.reject.

Same as reject(CharPredicate) , only the results are added to the target MutableCharCollection.

public boolean
public boolean
public boolean
public char
public boolean
public boolean
public boolean
public CharArrayList
public CharArrayList
select(CharPredicate predicate)

Implements org.eclipse.collections.api.list.primitive.MutableCharList.select, org.eclipse.collections.api.CharIterable.select.

Returns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.

public <R extends MutableCharCollection> R
select(CharPredicate predicate, R target)

Overrides default org.eclipse.collections.api.CharIterable.select.

Same as select(CharPredicate) , only the results are added to the target MutableCharCollection.

public char
private void
shiftElementsAtIndex(int index, int sourceSize)

public int
size()

Implements org.eclipse.collections.api.PrimitiveIterable.size.

Returns the number of items in this iterable.

private int
sizePlusFiftyPercent(int oldSize)

public CharArrayList
sortThis()

Implements org.eclipse.collections.api.list.primitive.MutableCharList.sortThis.

Sorts this list mutating its contents and returns the same mutable list (this).

public CharArrayList
sortThis(CharComparator comparator)

Overrides default org.eclipse.collections.api.list.primitive.MutableCharList.sortThis.

Sorts the internal data structure of this list and returns the list itself as a convenience.

public MutableCharList
public long
public void
private void
throwOutOfBounds(int index)

public char[]
toArray()

Implements org.eclipse.collections.api.CharIterable.toArray.

Converts the CharIterable to a primitive char array.

public char[]
toArray(char[] target)

Overrides default org.eclipse.collections.api.CharIterable.toArray.

Converts the CharIterable to a primitive char array.

public ImmutableCharList
toImmutable()

Implements org.eclipse.collections.api.list.primitive.MutableCharList.toImmutable.

Returns an immutable copy of this list.

public CharArrayList
public MutableCharStack
toStack()

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedCharIterable.toStack.

Converts the collection to a CharStack.

private void
public void
private void
wipeAndResetTheEnd(int newCurrentFilledIndex)

public CharArrayList
public 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 CharArrayList
private CharArrayList
withArrayCopy(char[] elements, int begin, int length)

public CharArrayList
public CharArrayList
public static CharArrayList
wrapCopy(char... array)

Creates a new list by first copying the array passed in.

public void
writeExternal(ObjectOutput out)

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

public <T> MutableList<CharObjectPair<T>>
zip(Iterable<T> iterable)

Overrides default org.eclipse.collections.api.list.primitive.MutableCharList.zip.

Returns a MutableList formed from this MutableCharList and a ListIterable by combining corresponding elements in pairs.

public MutableList<CharCharPair>
zipChar(CharIterable iterable)

Overrides default org.eclipse.collections.api.list.primitive.MutableCharList.zipChar.

Returns a MutableList formed from this MutableCharList and another CharList by combining corresponding elements in pairs.

Inherited from org.eclipse.collections.impl.primitive.AbstractCharIterable:
asLazyaveragemaxIfEmptymedianminIfEmptytoBagtoListtoSettoSortedArraytoSortedListtoString