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

public Class ByteArrayList

extends AbstractByteIterable
implements MutableByteList, Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable, org.eclipse.collections.api.list.primitive.MutableByteList, org.eclipse.collections.api.list.primitive.ByteList, org.eclipse.collections.api.ordered.primitive.ReversibleByteIterable, org.eclipse.collections.api.ordered.primitive.OrderedByteIterable, org.eclipse.collections.api.ByteIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.MutableByteCollection
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, java.util.Arrays, .Collection, .Iterator, .NoSuchElementException, org.eclipse.collections.api.ByteIterable, .LazyByteIterable, .RichIterable, org.eclipse.collections.api.block.comparator.primitive.ByteComparator, org.eclipse.collections.api.block.function.primitive.ObjectByteIntToObjectFunction, .ObjectByteToObjectFunction, .ByteToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.BytePredicate, org.eclipse.collections.api.block.procedure.primitive.ByteIntProcedure, .ByteProcedure, org.eclipse.collections.api.collection.primitive.MutableByteCollection, org.eclipse.collections.api.factory.Lists, org.eclipse.collections.api.iterator.MutableByteIterator, .ByteIterator, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.list.primitive.ByteList, .ImmutableByteList, .MutableByteList, org.eclipse.collections.api.set.primitive.ByteSet, .MutableByteSet, org.eclipse.collections.api.stack.primitive.MutableByteStack, org.eclipse.collections.api.tuple.primitive.ByteBytePair, .ByteObjectPair, org.eclipse.collections.impl.factory.primitive.ByteLists, .ByteStacks, org.eclipse.collections.impl.lazy.primitive.ReverseByteIterable, org.eclipse.collections.impl.primitive.AbstractByteIterable, org.eclipse.collections.impl.set.mutable.primitive.ByteHashSet, org.eclipse.collections.impl.tuple.primitive.PrimitiveTuples, org.eclipse.collections.impl.utility.Iterate, org.eclipse.collections.impl.utility.primitive.ByteQuickSort

ByteArrayList is similar to FastList, and is memory-optimized for byte 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 byte[]
protected transient byte[]
private static final int
private static final long
protected int
private static final byte[]

Constructor Summary

AccessConstructor and Description
public
public
ByteArrayList(int initialCapacity)

public
ByteArrayList(byte... 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, byte element)

public boolean
allSatisfy(BytePredicate predicate)

Implements org.eclipse.collections.api.ByteIterable.allSatisfy.

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

public boolean
anySatisfy(BytePredicate predicate)

Implements org.eclipse.collections.api.ByteIterable.anySatisfy.

Returns true if any of the elements in the ByteIterable 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 LazyByteIterable
public MutableByteList
public MutableByteList
public int
public MutableList<Byte>
public MutableByteIterator
byteIterator()

Implements org.eclipse.collections.api.collection.primitive.MutableByteCollection.byteIterator, org.eclipse.collections.api.ByteIterable.byteIterator.

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

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

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

Partitions elements in fixed size chunks.

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

Implements org.eclipse.collections.api.list.primitive.MutableByteList.collect, org.eclipse.collections.api.ByteIterable.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(ByteToObjectFunction<? extends V> function, R target)

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

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

public boolean
contains(byte value)

Implements org.eclipse.collections.api.ByteIterable.contains.

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

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

private byte[]
copyItemsWithNewCapacity(int newCapacity)

public int
count(BytePredicate predicate)

Implements org.eclipse.collections.api.ByteIterable.count.

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

public byte
public MutableByteList
public long
public void
each(ByteProcedure procedure)

Implements org.eclipse.collections.api.ByteIterable.each.

A synonym for forEach.

public void
ensureCapacity(int minCapacity)

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

Implements org.eclipse.collections.api.ByteIterable.injectInto.

public <T> T
public int
public byte
public byte
public ByteArrayList
newEmpty()

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

Creates a new empty ByteArrayList.

private IndexOutOfBoundsException
public static ByteArrayList
public static ByteArrayList
newListWith(byte... elements)

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

public static ByteArrayList
newWithNValues(int size, byte 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 ByteArrayList
reject(BytePredicate predicate)

Implements org.eclipse.collections.api.list.primitive.MutableByteList.reject, org.eclipse.collections.api.ByteIterable.reject.

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

public <R extends MutableByteCollection> R
reject(BytePredicate predicate, R target)

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

Same as reject(BytePredicate) , only the results are added to the target MutableByteCollection.

public boolean
public boolean
public boolean
public byte
public boolean
public boolean
public boolean
public ByteArrayList
public ByteArrayList
select(BytePredicate predicate)

Implements org.eclipse.collections.api.list.primitive.MutableByteList.select, org.eclipse.collections.api.ByteIterable.select.

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

public <R extends MutableByteCollection> R
select(BytePredicate predicate, R target)

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

Same as select(BytePredicate) , only the results are added to the target MutableByteCollection.

public byte
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 ByteArrayList
sortThis()

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

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

public ByteArrayList
sortThis(ByteComparator comparator)

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

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

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

public byte[]
toArray()

Implements org.eclipse.collections.api.ByteIterable.toArray.

Converts the ByteIterable to a primitive byte array.

public byte[]
toArray(byte[] target)

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

Converts the ByteIterable to a primitive byte array.

public ImmutableByteList
toImmutable()

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

Returns an immutable copy of this list.

public ByteArrayList
public MutableByteStack
toStack()

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

Converts the collection to a ByteStack.

private void
public void
private void
wipeAndResetTheEnd(int newCurrentFilledIndex)

public ByteArrayList
public ByteArrayList
with(byte element1, byte element2)

public ByteArrayList
with(byte element1, byte element2, byte element3)

public ByteArrayList
with(byte element1, byte element2, byte element3, byte... elements)

public ByteArrayList
private ByteArrayList
withArrayCopy(byte[] elements, int begin, int length)

public ByteArrayList
public ByteArrayList
public static ByteArrayList
wrapCopy(byte... 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<ByteObjectPair<T>>
zip(Iterable<T> iterable)

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

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

public MutableList<ByteBytePair>
zipByte(ByteIterable iterable)

Overrides default org.eclipse.collections.api.list.primitive.MutableByteList.zipByte.

Returns a MutableList formed from this MutableByteList and another ByteList by combining corresponding elements in pairs.

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