public class ByteArrayList extends AbstractByteIterable implements MutableByteList, Externalizable
| 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) |
LazyByteIterable |
asReversed() |
MutableByteList |
asSynchronized() |
MutableByteList |
asUnmodifiable() |
int |
binarySearch(byte value) |
MutableByteIterator |
byteIterator() |
RichIterable<ByteIterable> |
chunk(int size) |
void |
clear() |
<V> MutableList<V> |
collect(ByteToObjectFunction<? extends V> function) |
<V,R extends Collection<V>> |
collect(ByteToObjectFunction<? extends V> function,
R target) |
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) |
void |
forEachWithIndex(ByteIntProcedure procedure) |
byte |
get(int index) |
byte |
getFirst() |
byte |
getLast() |
int |
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() |
ByteArrayList |
newEmpty()
Creates a new empty ByteArrayList.
|
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) |
void |
readExternal(ObjectInput in) |
ByteArrayList |
reject(BytePredicate predicate) |
<R extends MutableByteCollection> |
reject(BytePredicate predicate,
R target) |
boolean |
remove(byte value) |
boolean |
removeAll(byte... source) |
boolean |
removeAll(ByteIterable source) |
byte |
removeAtIndex(int index) |
boolean |
removeIf(BytePredicate predicate) |
boolean |
retainAll(byte... source) |
boolean |
retainAll(ByteIterable source) |
ByteArrayList |
reverseThis() |
ByteArrayList |
select(BytePredicate predicate) |
<R extends MutableByteCollection> |
select(BytePredicate predicate,
R target) |
byte |
set(int index,
byte element) |
int |
size() |
ByteArrayList |
sortThis() |
ByteArrayList |
sortThis(ByteComparator comparator) |
MutableByteList |
subList(int fromIndex,
int toIndex) |
long |
sum() |
void |
swap(int index1,
int index2) |
byte[] |
toArray() |
byte[] |
toArray(byte[] target) |
ImmutableByteList |
toImmutable() |
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) |
static ByteArrayList |
wrapCopy(byte... array)
Creates a new list by first copying the array passed in.
|
void |
writeExternal(ObjectOutput out) |
<T> MutableList<ByteObjectPair<T>> |
zip(Iterable<T> iterable) |
MutableList<ByteBytePair> |
zipByte(ByteIterable 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 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 static ByteArrayList wrapCopy(byte... array)
public int size()
size 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 removeIf(BytePredicate predicate)
removeIf 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 MutableByteCollectionpublic boolean retainAll(byte... source)
retainAll in interface MutableByteCollectionpublic byte removeAtIndex(int index)
removeAtIndex in interface MutableByteListpublic byte set(int index,
byte element)
set in interface MutableByteListpublic void swap(int index1,
int index2)
swap 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 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 RichIterable<ByteIterable> chunk(int size)
chunk in interface ByteIterablepublic int count(BytePredicate predicate)
count in interface ByteIterablepublic boolean anySatisfy(BytePredicate predicate)
anySatisfy in interface ByteIterablepublic boolean allSatisfy(BytePredicate predicate)
allSatisfy 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 <R extends MutableByteCollection> R select(BytePredicate predicate, R target)
select in interface ByteIterablepublic ByteArrayList reject(BytePredicate predicate)
reject in interface ByteIterablereject in interface MutableByteCollectionreject in interface ByteListreject in interface MutableByteListreject in interface OrderedByteIterablereject in interface ReversibleByteIterablepublic <R extends MutableByteCollection> R reject(BytePredicate predicate, R target)
reject in interface ByteIterablepublic 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 <V,R extends Collection<V>> R collect(ByteToObjectFunction<? extends V> function, R target)
collect in interface ByteIterablepublic 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 byte[] toArray(byte[] target)
toArray in interface ByteIterablepublic boolean equals(Object otherList)
public int hashCode()
public void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface PrimitiveIterablepublic MutableByteList asUnmodifiable()
asUnmodifiable in interface MutableByteCollectionasUnmodifiable in interface MutableByteListpublic MutableByteList asSynchronized()
asSynchronized in interface MutableByteCollectionasSynchronized in interface MutableByteListpublic ImmutableByteList toImmutable()
toImmutable 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()
sortThis in interface MutableByteListpublic ByteArrayList sortThis(ByteComparator comparator)
sortThis 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 MutableByteListpublic MutableList<ByteBytePair> zipByte(ByteIterable iterable)
zipByte in interface ByteListzipByte in interface MutableByteListpublic ByteArrayList newEmpty()
newEmpty in interface MutableByteCollectionnewEmpty in interface MutableByteListpublic <T> MutableList<ByteObjectPair<T>> zip(Iterable<T> iterable)
zip in interface ByteListzip in interface MutableByteListCopyright © 2004–2022. All rights reserved.