@NotThreadSafe public class ByteArrayList extends AbstractByteIterable implements MutableByteList, Externalizable
FastList, and is memory-optimized for byte primitives.
This file was automatically generated from template file primitiveArrayList.stg.| Constructor and Description |
|---|
ByteArrayList() |
ByteArrayList(byte... array) |
ByteArrayList(int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(byte newItem) |
boolean |
addAll(byte... source) |
boolean |
addAll(ByteIterable source) |
boolean |
addAllAtIndex(int index,
byte... source) |
boolean |
addAllAtIndex(int index,
ByteIterable source) |
void |
addAtIndex(int index,
byte element) |
boolean |
allSatisfy(BytePredicate predicate) |
boolean |
anySatisfy(BytePredicate predicate) |
void |
appendString(Appendable appendable,
String start,
String separator,
String end)
Prints a string representation of this collection onto the given
Appendable. |
LazyByteIterable |
asReversed() |
MutableByteList |
asSynchronized() |
MutableByteList |
asUnmodifiable() |
int |
binarySearch(byte value) |
MutableByteIterator |
byteIterator() |
void |
clear() |
<V> MutableList<V> |
collect(ByteToObjectFunction<? extends V> function) |
boolean |
contains(byte value) |
int |
count(BytePredicate predicate) |
byte |
detectIfNone(BytePredicate predicate,
byte ifNone) |
MutableByteList |
distinct() |
long |
dotProduct(ByteList list) |
void |
each(ByteProcedure procedure) |
void |
ensureCapacity(int minCapacity) |
boolean |
equals(Object otherList)
Follows the same general contract as
List.equals(Object). |
void |
forEach(ByteProcedure procedure) |
void |
forEachWithIndex(ByteIntProcedure procedure) |
byte |
get(int index) |
byte |
getFirst() |
byte |
getLast() |
int |
hashCode()
Follows the same general contract as
List.hashCode(). |
int |
indexOf(byte value) |
<T> T |
injectInto(T injectedValue,
ObjectByteToObjectFunction<? super T,? extends T> function) |
<T> T |
injectIntoWithIndex(T injectedValue,
ObjectByteIntToObjectFunction<? super T,? extends T> function) |
int |
lastIndexOf(byte value) |
byte |
max() |
byte |
min() |
static ByteArrayList |
newList(ByteIterable source) |
static ByteArrayList |
newListWith(byte... elements)
Creates a new list using the passed
elements argument as the backing store. |
static ByteArrayList |
newWithNValues(int size,
byte value) |
boolean |
noneSatisfy(BytePredicate predicate) |
void |
readExternal(ObjectInput in) |
ByteArrayList |
reject(BytePredicate predicate) |
boolean |
remove(byte value) |
boolean |
removeAll(byte... source) |
boolean |
removeAll(ByteIterable source) |
byte |
removeAtIndex(int index) |
boolean |
retainAll(byte... source) |
boolean |
retainAll(ByteIterable source) |
ByteArrayList |
reverseThis() |
ByteArrayList |
select(BytePredicate predicate) |
byte |
set(int index,
byte element) |
int |
size()
Returns the number of items in this iterable.
|
ByteArrayList |
sortThis()
Sorts this list mutating its contents and returns the same mutable list (this).
|
MutableByteList |
subList(int fromIndex,
int toIndex) |
long |
sum() |
byte[] |
toArray() |
ImmutableByteList |
toImmutable()
Returns an immutable copy of this list.
|
ByteArrayList |
toReversed() |
void |
trimToSize() |
ByteArrayList |
with(byte element) |
ByteArrayList |
with(byte element1,
byte element2) |
ByteArrayList |
with(byte element1,
byte element2,
byte element3) |
ByteArrayList |
with(byte element1,
byte element2,
byte element3,
byte... elements) |
ByteArrayList |
withAll(ByteIterable elements) |
ByteArrayList |
without(byte element) |
ByteArrayList |
withoutAll(ByteIterable elements) |
void |
writeExternal(ObjectOutput out) |
appendString, appendString, asLazy, average, containsAll, containsAll, isEmpty, makeString, makeString, makeString, maxIfEmpty, median, minIfEmpty, notEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringasLazy, average, containsAll, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListappendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toStringpublic ByteArrayList()
public ByteArrayList(int initialCapacity)
public ByteArrayList(byte... array)
public static ByteArrayList newListWith(byte... 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 ByteArrayList newList(ByteIterable source)
public static ByteArrayList newWithNValues(int size, byte value)
public int size()
PrimitiveIterablesize in interface PrimitiveIterablepublic void clear()
clear in interface MutableByteCollectionpublic boolean contains(byte value)
contains in interface ByteIterablepublic byte getFirst()
getFirst in interface OrderedByteIterablepublic byte getLast()
getLast in interface ReversibleByteIterablepublic int indexOf(byte value)
indexOf in interface OrderedByteIterablepublic int lastIndexOf(byte value)
lastIndexOf in interface ByteListpublic void trimToSize()
public void ensureCapacity(int minCapacity)
public boolean add(byte newItem)
add in interface MutableByteCollectionpublic boolean addAll(byte... source)
addAll in interface MutableByteCollectionpublic boolean addAll(ByteIterable source)
addAll in interface MutableByteCollectionpublic void addAtIndex(int index,
byte element)
addAtIndex in interface MutableByteListpublic boolean addAllAtIndex(int index,
byte... source)
addAllAtIndex in interface MutableByteListpublic boolean addAllAtIndex(int index,
ByteIterable source)
addAllAtIndex in interface MutableByteListpublic boolean remove(byte value)
remove in interface MutableByteCollectionpublic boolean removeAll(ByteIterable source)
removeAll in interface MutableByteCollectionpublic boolean removeAll(byte... source)
removeAll in interface MutableByteCollectionpublic boolean retainAll(ByteIterable source)
retainAll in interface MutableByteCollectionCollection.retainAll(Collection)public boolean retainAll(byte... source)
retainAll in interface MutableByteCollectionCollection.retainAll(Collection)public byte removeAtIndex(int index)
removeAtIndex in interface MutableByteListpublic byte set(int index,
byte element)
set in interface MutableByteListpublic ByteArrayList with(byte element)
with in interface MutableByteCollectionwith in interface MutableByteListpublic ByteArrayList without(byte element)
without in interface MutableByteCollectionwithout in interface MutableByteListpublic ByteArrayList withAll(ByteIterable elements)
withAll in interface MutableByteCollectionwithAll in interface MutableByteListpublic ByteArrayList withoutAll(ByteIterable elements)
withoutAll in interface MutableByteCollectionwithoutAll in interface MutableByteListpublic 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 MutableByteIterator byteIterator()
byteIterator in interface ByteIterablebyteIterator in interface MutableByteCollectionpublic void forEach(ByteProcedure procedure)
forEach in interface ByteIterablepublic void each(ByteProcedure procedure)
each in interface ByteIterablepublic void forEachWithIndex(ByteIntProcedure procedure)
forEachWithIndex in interface OrderedByteIterablepublic <T> T injectInto(T injectedValue,
ObjectByteToObjectFunction<? super T,? extends T> function)
injectInto in interface ByteIterablepublic <T> T injectIntoWithIndex(T injectedValue,
ObjectByteIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex in interface OrderedByteIterableinjectIntoWithIndex in interface ReversibleByteIterablepublic int count(BytePredicate predicate)
count in interface ByteIterablepublic boolean anySatisfy(BytePredicate predicate)
anySatisfy in interface ByteIterablepublic boolean allSatisfy(BytePredicate predicate)
allSatisfy in interface ByteIterablepublic boolean noneSatisfy(BytePredicate predicate)
noneSatisfy in interface ByteIterablepublic ByteArrayList select(BytePredicate predicate)
select in interface ByteIterableselect in interface MutableByteCollectionselect in interface ByteListselect in interface MutableByteListselect in interface OrderedByteIterableselect in interface ReversibleByteIterablepublic ByteArrayList reject(BytePredicate predicate)
reject in interface ByteIterablereject in interface MutableByteCollectionreject in interface ByteListreject in interface MutableByteListreject in interface OrderedByteIterablereject in interface ReversibleByteIterablepublic byte detectIfNone(BytePredicate predicate, byte ifNone)
detectIfNone in interface ByteIterablepublic <V> MutableList<V> collect(ByteToObjectFunction<? extends V> function)
collect in interface ByteIterablecollect in interface MutableByteCollectioncollect in interface ByteListcollect in interface MutableByteListcollect in interface OrderedByteIterablecollect in interface ReversibleByteIterablepublic byte max()
max in interface ByteIterablepublic byte min()
min in interface ByteIterablepublic long sum()
sum in interface ByteIterablepublic long dotProduct(ByteList list)
dotProduct in interface ByteListpublic byte[] toArray()
toArray in interface ByteIterablepublic boolean equals(Object otherList)
ByteListList.equals(Object).public int hashCode()
ByteListList.hashCode().public void appendString(Appendable appendable, String start, String separator, String end)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String, String, String).appendString in interface PrimitiveIterablepublic MutableByteList asUnmodifiable()
asUnmodifiable in interface MutableByteCollectionasUnmodifiable in interface MutableByteListpublic MutableByteList asSynchronized()
asSynchronized in interface MutableByteCollectionasSynchronized in interface MutableByteListpublic ImmutableByteList toImmutable()
MutableByteListtoImmutable in interface MutableByteCollectiontoImmutable in interface ByteListtoImmutable in interface MutableByteListpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizableIOExceptionpublic LazyByteIterable asReversed()
asReversed in interface ReversibleByteIterablepublic ByteArrayList reverseThis()
reverseThis in interface MutableByteListpublic ByteArrayList sortThis()
MutableByteListsortThis in interface MutableByteListpublic ByteArrayList toReversed()
toReversed in interface ByteListtoReversed in interface MutableByteListtoReversed in interface ReversibleByteIterablepublic int binarySearch(byte value)
binarySearch in interface ByteListpublic MutableByteList distinct()
distinct in interface ByteListdistinct in interface MutableByteListdistinct in interface ReversibleByteIterablepublic MutableByteList subList(int fromIndex, int toIndex)
subList in interface ByteListsubList in interface MutableByteListList#subList(int fromIndex, int toIndex)}Copyright © 2004–2016. All rights reserved.