@NotThreadSafe public final class ByteArrayList extends Object 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)
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(Appendable appendable,
String separator)
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(Appendable appendable,
String start,
String separator,
String end)
Prints a string representation of this collection onto the given
Appendable. |
LazyByteIterable |
asLazy() |
LazyByteIterable |
asReversed() |
MutableByteList |
asSynchronized() |
MutableByteList |
asUnmodifiable() |
double |
average() |
ByteIterator |
byteIterator() |
void |
clear() |
<V> MutableList<V> |
collect(ByteToObjectFunction<? extends V> function) |
boolean |
contains(byte value) |
boolean |
containsAll(byte... source) |
boolean |
containsAll(ByteIterable source) |
int |
count(BytePredicate predicate) |
byte |
detectIfNone(BytePredicate predicate,
byte ifNone) |
long |
dotProduct(ByteList list) |
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) |
boolean |
isEmpty()
Returns true if this iterable has zero items.
|
int |
lastIndexOf(byte value) |
String |
makeString()
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space). |
String |
makeString(String separator)
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String). |
String |
makeString(String start,
String separator,
String end)
Returns a string representation of this collection.
|
byte |
max() |
byte |
maxIfEmpty(byte defaultValue) |
double |
median() |
byte |
min() |
byte |
minIfEmpty(byte defaultValue) |
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) |
boolean |
notEmpty()
The English equivalent of !this.isEmpty()
|
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() |
MutableByteBag |
toBag() |
ImmutableByteList |
toImmutable()
Returns an immutable copy of this list.
|
MutableByteList |
toList() |
ByteArrayList |
toReversed() |
MutableByteSet |
toSet() |
byte[] |
toSortedArray() |
MutableByteList |
toSortedList() |
String |
toString()
Returns a string representation of this PrimitiveIterable.
|
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) |
public 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 boolean isEmpty()
PrimitiveIterableisEmpty in interface PrimitiveIterablepublic boolean notEmpty()
PrimitiveIterablenotEmpty in interface PrimitiveIterablepublic void clear()
clear in interface MutableByteCollectionpublic boolean contains(byte value)
contains in interface ByteIterablepublic boolean containsAll(byte... source)
containsAll in interface ByteIterablepublic boolean containsAll(ByteIterable source)
containsAll in interface ByteIterablepublic byte getFirst()
getFirst in interface ReversibleByteIterablepublic byte getLast()
getLast in interface ReversibleByteIterablepublic int indexOf(byte value)
indexOf in interface ReversibleByteIterablepublic 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 ByteIterator byteIterator()
byteIterator in interface ByteIterablepublic void forEach(ByteProcedure procedure)
forEach in interface ByteIterablepublic void forEachWithIndex(ByteIntProcedure procedure)
forEachWithIndex in interface ReversibleByteIterablepublic <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 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 ReversibleByteIterablepublic ByteArrayList reject(BytePredicate predicate)
reject in interface ByteIterablereject in interface MutableByteCollectionreject in interface ByteListreject in interface MutableByteListreject 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 ReversibleByteIterablepublic byte max()
max in interface ByteIterablepublic byte min()
min in interface ByteIterablepublic byte minIfEmpty(byte defaultValue)
minIfEmpty in interface ByteIterablepublic byte maxIfEmpty(byte defaultValue)
maxIfEmpty in interface ByteIterablepublic long sum()
sum in interface ByteIterablepublic long dotProduct(ByteList list)
dotProduct in interface ByteListpublic double average()
average in interface ByteIterablepublic double median()
median in interface ByteIterablepublic byte[] toArray()
toArray in interface ByteIterablepublic byte[] toSortedArray()
toSortedArray in interface ByteIterablepublic boolean equals(Object otherList)
ByteListList.equals(Object).public int hashCode()
ByteListList.hashCode().public String toString()
PrimitiveIterabletoString in interface PrimitiveIterabletoString in class Objectpublic String makeString()
PrimitiveIterablePrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space).makeString in interface PrimitiveIterablepublic String makeString(String separator)
PrimitiveIterablePrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String).makeString in interface PrimitiveIterablepublic String makeString(String start, String separator, String end)
PrimitiveIterablemakeString in interface PrimitiveIterablepublic void appendString(Appendable appendable)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString().appendString in interface PrimitiveIterablepublic void appendString(Appendable appendable, String separator)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String).appendString in interface PrimitiveIterablepublic 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 toList()
toList in interface ByteIterablepublic MutableByteList toSortedList()
toSortedList in interface ByteIterablepublic MutableByteSet toSet()
toSet in interface ByteIterablepublic MutableByteBag toBag()
toBag in interface ByteIterablepublic LazyByteIterable asLazy()
asLazy in interface ByteIterablepublic 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 MutableByteList subList(int fromIndex, int toIndex)
subList in interface ByteListsubList in interface MutableByteListList#subList(int fromIndex, int toIndex)}Copyright © 2004–2017. All rights reserved.