Class ByteArrayList
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractByteIterable
org.eclipse.collections.impl.list.mutable.primitive.ByteArrayList
- All Implemented Interfaces:
Externalizable,Serializable,ByteIterable,MutableByteCollection,ByteList,MutableByteList,OrderedByteIterable,ReversibleByteIterable,PrimitiveIterable
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.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(byte newItem) booleanaddAll(byte... source) booleanaddAll(ByteIterable source) booleanaddAllAtIndex(int index, byte... source) booleanaddAllAtIndex(int index, ByteIterable source) voidaddAtIndex(int index, byte element) booleanallSatisfy(BytePredicate predicate) booleananySatisfy(BytePredicate predicate) voidappendString(Appendable appendable, String start, String separator, String end) intbinarySearch(byte value) boxed()chunk(int size) voidclear()<V> MutableList<V>collect(ByteToObjectFunction<? extends V> function) <V,R extends Collection<V>>
Rcollect(ByteToObjectFunction<? extends V> function, R target) booleancontains(byte value) intcount(BytePredicate predicate) bytedetectIfNone(BytePredicate predicate, byte ifNone) distinct()longdotProduct(ByteList list) voideach(ByteProcedure procedure) voidensureCapacity(int minCapacity) booleanvoidforEachWithIndex(ByteIntProcedure procedure) byteget(int index) bytegetFirst()bytegetLast()inthashCode()intindexOf(byte value) <T> TinjectInto(T injectedValue, ObjectByteToObjectFunction<? super T, ? extends T> function) <T> TinjectIntoWithIndex(T injectedValue, ObjectByteIntToObjectFunction<? super T, ? extends T> function) intlastIndexOf(byte value) bytemax()bytemin()newEmpty()Creates a new empty ByteArrayList.static ByteArrayListnewList(ByteIterable source) static ByteArrayListnewListWith(byte... elements) Creates a new list using the passedelementsargument as the backing store.static ByteArrayListnewWithNValues(int size, byte value) voidreject(BytePredicate predicate) <R extends MutableByteCollection>
Rreject(BytePredicate predicate, R target) booleanremove(byte value) booleanremoveAll(byte... source) booleanremoveAll(ByteIterable source) byteremoveAtIndex(int index) booleanremoveIf(BytePredicate predicate) booleanretainAll(byte... source) booleanretainAll(ByteIterable source) select(BytePredicate predicate) <R extends MutableByteCollection>
Rselect(BytePredicate predicate, R target) byteset(int index, byte element) intsize()sortThis()sortThis(ByteComparator comparator) subList(int fromIndex, int toIndex) longsum()voidswap(int index1, int index2) byte[]toArray()byte[]toArray(byte[] target) toStack()voidwith(byte element) with(byte element1, byte element2) with(byte element1, byte element2, byte element3) with(byte element1, byte element2, byte element3, byte... elements) withAll(ByteIterable elements) without(byte element) withoutAll(ByteIterable elements) static ByteArrayListwrapCopy(byte... array) Creates a new list by first copying the array passed in.void<T> MutableList<ByteObjectPair<T>>zipByte(ByteIterable iterable) Methods inherited from class org.eclipse.collections.impl.primitive.AbstractByteIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods inherited from interface org.eclipse.collections.api.ByteIterable
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.ByteList
forEachInBothMethods inherited from interface org.eclipse.collections.api.list.primitive.MutableByteList
collectWithIndex, rejectWithIndex, selectWithIndex, shuffleThis, shuffleThis, sortThisBy, sortThisBy, tapMethods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedByteIterable
collectWithIndex, rejectWithIndex, selectWithIndexMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
-
Constructor Details
-
ByteArrayList
public ByteArrayList() -
ByteArrayList
public ByteArrayList(int initialCapacity) -
ByteArrayList
public ByteArrayList(byte... 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 interfaceMutableByteCollection
-
contains
public boolean contains(byte value) - Specified by:
containsin interfaceByteIterable
-
get
public byte get(int index) -
getFirst
public byte getFirst()- Specified by:
getFirstin interfaceOrderedByteIterable
-
getLast
public byte getLast()- Specified by:
getLastin interfaceReversibleByteIterable
-
indexOf
public int indexOf(byte value) - Specified by:
indexOfin interfaceOrderedByteIterable
-
lastIndexOf
public int lastIndexOf(byte value) - Specified by:
lastIndexOfin interfaceByteList
-
trimToSize
public void trimToSize() -
ensureCapacity
public void ensureCapacity(int minCapacity) -
add
public boolean add(byte newItem) - Specified by:
addin interfaceMutableByteCollection
-
addAll
public boolean addAll(byte... source) - Specified by:
addAllin interfaceMutableByteCollection
-
addAll
- Specified by:
addAllin interfaceMutableByteCollection
-
addAtIndex
public void addAtIndex(int index, byte element) - Specified by:
addAtIndexin interfaceMutableByteList
-
addAllAtIndex
public boolean addAllAtIndex(int index, byte... source) - Specified by:
addAllAtIndexin interfaceMutableByteList
-
addAllAtIndex
- Specified by:
addAllAtIndexin interfaceMutableByteList
-
remove
public boolean remove(byte value) - Specified by:
removein interfaceMutableByteCollection
-
removeIf
- Specified by:
removeIfin interfaceMutableByteCollection
-
removeAll
- Specified by:
removeAllin interfaceMutableByteCollection
-
removeAll
public boolean removeAll(byte... source) - Specified by:
removeAllin interfaceMutableByteCollection
-
retainAll
- Specified by:
retainAllin interfaceMutableByteCollection
-
retainAll
public boolean retainAll(byte... source) - Specified by:
retainAllin interfaceMutableByteCollection
-
removeAtIndex
public byte removeAtIndex(int index) - Specified by:
removeAtIndexin interfaceMutableByteList
-
set
public byte set(int index, byte element) - Specified by:
setin interfaceMutableByteList
-
swap
public void swap(int index1, int index2) - Specified by:
swapin interfaceMutableByteList
-
with
- Specified by:
within interfaceMutableByteCollection- Specified by:
within interfaceMutableByteList
-
without
- Specified by:
withoutin interfaceMutableByteCollection- Specified by:
withoutin interfaceMutableByteList
-
withAll
- Specified by:
withAllin interfaceMutableByteCollection- Specified by:
withAllin interfaceMutableByteList
-
withoutAll
- Specified by:
withoutAllin interfaceMutableByteCollection- Specified by:
withoutAllin interfaceMutableByteList
-
with
-
with
-
with
-
byteIterator
- Specified by:
byteIteratorin interfaceByteIterable- Specified by:
byteIteratorin interfaceMutableByteCollection
-
each
- Specified by:
eachin interfaceByteIterable- Since:
- 7.0.
-
forEachWithIndex
- Specified by:
forEachWithIndexin interfaceOrderedByteIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectByteToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoin interfaceByteIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectByteIntToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoWithIndexin interfaceOrderedByteIterable- Specified by:
injectIntoWithIndexin interfaceReversibleByteIterable
-
chunk
- Specified by:
chunkin interfaceByteIterable
-
count
- Specified by:
countin interfaceByteIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceByteIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceByteIterable
-
select
- Specified by:
selectin interfaceByteIterable- Specified by:
selectin interfaceByteList- Specified by:
selectin interfaceMutableByteCollection- Specified by:
selectin interfaceMutableByteList- Specified by:
selectin interfaceOrderedByteIterable- Specified by:
selectin interfaceReversibleByteIterable
-
select
- Specified by:
selectin interfaceByteIterable- Since:
- 8.1.
-
reject
- Specified by:
rejectin interfaceByteIterable- Specified by:
rejectin interfaceByteList- Specified by:
rejectin interfaceMutableByteCollection- Specified by:
rejectin interfaceMutableByteList- Specified by:
rejectin interfaceOrderedByteIterable- Specified by:
rejectin interfaceReversibleByteIterable
-
reject
- Specified by:
rejectin interfaceByteIterable- Since:
- 8.1.
-
detectIfNone
- Specified by:
detectIfNonein interfaceByteIterable
-
collect
- Specified by:
collectin interfaceByteIterable- Specified by:
collectin interfaceByteList- Specified by:
collectin interfaceMutableByteCollection- Specified by:
collectin interfaceMutableByteList- Specified by:
collectin interfaceOrderedByteIterable- Specified by:
collectin interfaceReversibleByteIterable
-
collect
- Specified by:
collectin interfaceByteIterable- Since:
- 8.1.
-
max
public byte max()- Specified by:
maxin interfaceByteIterable
-
min
public byte min()- Specified by:
minin interfaceByteIterable
-
sum
public long sum()- Specified by:
sumin interfaceByteIterable
-
dotProduct
- Specified by:
dotProductin interfaceByteList
-
toArray
public byte[] toArray()- Specified by:
toArrayin interfaceByteIterable
-
toArray
public byte[] toArray(byte[] target) - Specified by:
toArrayin interfaceByteIterable
-
equals
-
hashCode
public int hashCode() -
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableByteCollection- Specified by:
asUnmodifiablein interfaceMutableByteList
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableByteCollection- Specified by:
asSynchronizedin interfaceMutableByteList
-
toImmutable
- Specified by:
toImmutablein interfaceByteList- Specified by:
toImmutablein interfaceMutableByteCollection- Specified by:
toImmutablein interfaceMutableByteList
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-
asReversed
- Specified by:
asReversedin interfaceReversibleByteIterable
-
reverseThis
- Specified by:
reverseThisin interfaceMutableByteList
-
sortThis
- Specified by:
sortThisin interfaceMutableByteList
-
sortThis
- Specified by:
sortThisin interfaceMutableByteList
-
toReversed
- Specified by:
toReversedin interfaceByteList- Specified by:
toReversedin interfaceMutableByteList- Specified by:
toReversedin interfaceReversibleByteIterable
-
binarySearch
public int binarySearch(byte value) - Specified by:
binarySearchin interfaceByteList
-
distinct
- Specified by:
distinctin interfaceByteList- Specified by:
distinctin interfaceMutableByteList- Specified by:
distinctin interfaceReversibleByteIterable
-
subList
- Specified by:
subListin interfaceByteList- Specified by:
subListin interfaceMutableByteList
-
zipByte
- Specified by:
zipBytein interfaceByteList- Specified by:
zipBytein interfaceMutableByteList- Since:
- 9.1.
-
newEmpty
Creates a new empty ByteArrayList.- Specified by:
newEmptyin interfaceMutableByteCollection- Specified by:
newEmptyin interfaceMutableByteList- Since:
- 9.2.
-
zip
- Specified by:
zipin interfaceByteList- Specified by:
zipin interfaceMutableByteList- Since:
- 9.1.
-
boxed
- Specified by:
boxedin interfaceMutableByteList
-
toStack
- Specified by:
toStackin interfaceOrderedByteIterable
-