@NotThreadSafe public class ByteArrayList extends AbstractByteIterable implements com.gs.collections.api.list.primitive.MutableByteList, java.io.Externalizable
FastList, and is memory-optimized for byte primitives.
This file was automatically generated from template file primitiveArrayList.stg.| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
items |
protected int |
size |
| 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(com.gs.collections.api.ByteIterable source) |
boolean |
addAllAtIndex(int index,
byte... source) |
boolean |
addAllAtIndex(int index,
com.gs.collections.api.ByteIterable source) |
void |
addAtIndex(int index,
byte element) |
boolean |
allSatisfy(com.gs.collections.api.block.predicate.primitive.BytePredicate predicate) |
boolean |
anySatisfy(com.gs.collections.api.block.predicate.primitive.BytePredicate predicate) |
void |
appendString(java.lang.Appendable appendable,
java.lang.String start,
java.lang.String separator,
java.lang.String end)
Prints a string representation of this collection onto the given
Appendable. |
com.gs.collections.api.LazyByteIterable |
asReversed() |
com.gs.collections.api.list.primitive.MutableByteList |
asSynchronized() |
com.gs.collections.api.list.primitive.MutableByteList |
asUnmodifiable() |
int |
binarySearch(byte value) |
com.gs.collections.api.iterator.MutableByteIterator |
byteIterator() |
void |
clear() |
<V> com.gs.collections.api.list.MutableList<V> |
collect(com.gs.collections.api.block.function.primitive.ByteToObjectFunction<? extends V> function) |
boolean |
contains(byte value) |
int |
count(com.gs.collections.api.block.predicate.primitive.BytePredicate predicate) |
byte |
detectIfNone(com.gs.collections.api.block.predicate.primitive.BytePredicate predicate,
byte ifNone) |
com.gs.collections.api.list.primitive.MutableByteList |
distinct() |
long |
dotProduct(com.gs.collections.api.list.primitive.ByteList list) |
void |
each(com.gs.collections.api.block.procedure.primitive.ByteProcedure procedure) |
void |
ensureCapacity(int minCapacity) |
boolean |
equals(java.lang.Object otherList)
Follows the same general contract as
List.equals(Object). |
void |
forEach(com.gs.collections.api.block.procedure.primitive.ByteProcedure procedure) |
void |
forEachWithIndex(com.gs.collections.api.block.procedure.primitive.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,
com.gs.collections.api.block.function.primitive.ObjectByteToObjectFunction<? super T,? extends T> function) |
<T> T |
injectIntoWithIndex(T injectedValue,
com.gs.collections.api.block.function.primitive.ObjectByteIntToObjectFunction<? super T,? extends T> function) |
int |
lastIndexOf(byte value) |
byte |
max() |
byte |
min() |
static ByteArrayList |
newList(com.gs.collections.api.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(com.gs.collections.api.block.predicate.primitive.BytePredicate predicate) |
void |
readExternal(java.io.ObjectInput in) |
ByteArrayList |
reject(com.gs.collections.api.block.predicate.primitive.BytePredicate predicate) |
boolean |
remove(byte value) |
boolean |
removeAll(byte... source) |
boolean |
removeAll(com.gs.collections.api.ByteIterable source) |
byte |
removeAtIndex(int index) |
boolean |
retainAll(byte... source) |
boolean |
retainAll(com.gs.collections.api.ByteIterable source) |
ByteArrayList |
reverseThis() |
ByteArrayList |
select(com.gs.collections.api.block.predicate.primitive.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).
|
com.gs.collections.api.list.primitive.MutableByteList |
subList(int fromIndex,
int toIndex) |
long |
sum() |
byte[] |
toArray() |
com.gs.collections.api.list.primitive.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(com.gs.collections.api.ByteIterable elements) |
ByteArrayList |
without(byte element) |
ByteArrayList |
withoutAll(com.gs.collections.api.ByteIterable elements) |
void |
writeExternal(java.io.ObjectOutput out) |
appendString, appendString, asLazy, average, containsAll, containsAll, isEmpty, makeString, makeString, makeString, maxIfEmpty, median, minIfEmpty, notEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic 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(com.gs.collections.api.ByteIterable source)
public static ByteArrayList newWithNValues(int size, byte value)
public int size()
com.gs.collections.api.PrimitiveIterablesize in interface com.gs.collections.api.PrimitiveIterablepublic void clear()
clear in interface com.gs.collections.api.collection.primitive.MutableByteCollectionpublic boolean contains(byte value)
contains in interface com.gs.collections.api.ByteIterablepublic byte get(int index)
get in interface com.gs.collections.api.list.primitive.ByteListpublic byte getFirst()
getFirst in interface com.gs.collections.api.ordered.primitive.OrderedByteIterablepublic byte getLast()
getLast in interface com.gs.collections.api.ordered.primitive.ReversibleByteIterablepublic int indexOf(byte value)
indexOf in interface com.gs.collections.api.ordered.primitive.OrderedByteIterablepublic int lastIndexOf(byte value)
lastIndexOf in interface com.gs.collections.api.list.primitive.ByteListpublic void trimToSize()
public void ensureCapacity(int minCapacity)
public boolean add(byte newItem)
add in interface com.gs.collections.api.collection.primitive.MutableByteCollectionpublic boolean addAll(byte... source)
addAll in interface com.gs.collections.api.collection.primitive.MutableByteCollectionpublic boolean addAll(com.gs.collections.api.ByteIterable source)
addAll in interface com.gs.collections.api.collection.primitive.MutableByteCollectionpublic void addAtIndex(int index,
byte element)
addAtIndex in interface com.gs.collections.api.list.primitive.MutableByteListpublic boolean addAllAtIndex(int index,
byte... source)
addAllAtIndex in interface com.gs.collections.api.list.primitive.MutableByteListpublic boolean addAllAtIndex(int index,
com.gs.collections.api.ByteIterable source)
addAllAtIndex in interface com.gs.collections.api.list.primitive.MutableByteListpublic boolean remove(byte value)
remove in interface com.gs.collections.api.collection.primitive.MutableByteCollectionpublic boolean removeAll(com.gs.collections.api.ByteIterable source)
removeAll in interface com.gs.collections.api.collection.primitive.MutableByteCollectionpublic boolean removeAll(byte... source)
removeAll in interface com.gs.collections.api.collection.primitive.MutableByteCollectionpublic boolean retainAll(com.gs.collections.api.ByteIterable source)
retainAll in interface com.gs.collections.api.collection.primitive.MutableByteCollectionCollection.retainAll(Collection)public boolean retainAll(byte... source)
retainAll in interface com.gs.collections.api.collection.primitive.MutableByteCollectionCollection.retainAll(Collection)public byte removeAtIndex(int index)
removeAtIndex in interface com.gs.collections.api.list.primitive.MutableByteListpublic byte set(int index,
byte element)
set in interface com.gs.collections.api.list.primitive.MutableByteListpublic ByteArrayList with(byte element)
with in interface com.gs.collections.api.collection.primitive.MutableByteCollectionwith in interface com.gs.collections.api.list.primitive.MutableByteListpublic ByteArrayList without(byte element)
without in interface com.gs.collections.api.collection.primitive.MutableByteCollectionwithout in interface com.gs.collections.api.list.primitive.MutableByteListpublic ByteArrayList withAll(com.gs.collections.api.ByteIterable elements)
withAll in interface com.gs.collections.api.collection.primitive.MutableByteCollectionwithAll in interface com.gs.collections.api.list.primitive.MutableByteListpublic ByteArrayList withoutAll(com.gs.collections.api.ByteIterable elements)
withoutAll in interface com.gs.collections.api.collection.primitive.MutableByteCollectionwithoutAll in interface com.gs.collections.api.list.primitive.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 com.gs.collections.api.iterator.MutableByteIterator byteIterator()
byteIterator in interface com.gs.collections.api.ByteIterablebyteIterator in interface com.gs.collections.api.collection.primitive.MutableByteCollectionpublic void forEach(com.gs.collections.api.block.procedure.primitive.ByteProcedure procedure)
forEach in interface com.gs.collections.api.ByteIterablepublic void each(com.gs.collections.api.block.procedure.primitive.ByteProcedure procedure)
each in interface com.gs.collections.api.ByteIterablepublic void forEachWithIndex(com.gs.collections.api.block.procedure.primitive.ByteIntProcedure procedure)
forEachWithIndex in interface com.gs.collections.api.ordered.primitive.OrderedByteIterablepublic <T> T injectInto(T injectedValue,
com.gs.collections.api.block.function.primitive.ObjectByteToObjectFunction<? super T,? extends T> function)
injectInto in interface com.gs.collections.api.ByteIterablepublic <T> T injectIntoWithIndex(T injectedValue,
com.gs.collections.api.block.function.primitive.ObjectByteIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex in interface com.gs.collections.api.ordered.primitive.OrderedByteIterableinjectIntoWithIndex in interface com.gs.collections.api.ordered.primitive.ReversibleByteIterablepublic int count(com.gs.collections.api.block.predicate.primitive.BytePredicate predicate)
count in interface com.gs.collections.api.ByteIterablepublic boolean anySatisfy(com.gs.collections.api.block.predicate.primitive.BytePredicate predicate)
anySatisfy in interface com.gs.collections.api.ByteIterablepublic boolean allSatisfy(com.gs.collections.api.block.predicate.primitive.BytePredicate predicate)
allSatisfy in interface com.gs.collections.api.ByteIterablepublic boolean noneSatisfy(com.gs.collections.api.block.predicate.primitive.BytePredicate predicate)
noneSatisfy in interface com.gs.collections.api.ByteIterablepublic ByteArrayList select(com.gs.collections.api.block.predicate.primitive.BytePredicate predicate)
select in interface com.gs.collections.api.ByteIterableselect in interface com.gs.collections.api.collection.primitive.MutableByteCollectionselect in interface com.gs.collections.api.list.primitive.ByteListselect in interface com.gs.collections.api.list.primitive.MutableByteListselect in interface com.gs.collections.api.ordered.primitive.OrderedByteIterableselect in interface com.gs.collections.api.ordered.primitive.ReversibleByteIterablepublic ByteArrayList reject(com.gs.collections.api.block.predicate.primitive.BytePredicate predicate)
reject in interface com.gs.collections.api.ByteIterablereject in interface com.gs.collections.api.collection.primitive.MutableByteCollectionreject in interface com.gs.collections.api.list.primitive.ByteListreject in interface com.gs.collections.api.list.primitive.MutableByteListreject in interface com.gs.collections.api.ordered.primitive.OrderedByteIterablereject in interface com.gs.collections.api.ordered.primitive.ReversibleByteIterablepublic byte detectIfNone(com.gs.collections.api.block.predicate.primitive.BytePredicate predicate,
byte ifNone)
detectIfNone in interface com.gs.collections.api.ByteIterablepublic <V> com.gs.collections.api.list.MutableList<V> collect(com.gs.collections.api.block.function.primitive.ByteToObjectFunction<? extends V> function)
collect in interface com.gs.collections.api.ByteIterablecollect in interface com.gs.collections.api.collection.primitive.MutableByteCollectioncollect in interface com.gs.collections.api.list.primitive.ByteListcollect in interface com.gs.collections.api.list.primitive.MutableByteListcollect in interface com.gs.collections.api.ordered.primitive.OrderedByteIterablecollect in interface com.gs.collections.api.ordered.primitive.ReversibleByteIterablepublic byte max()
max in interface com.gs.collections.api.ByteIterablepublic byte min()
min in interface com.gs.collections.api.ByteIterablepublic long sum()
sum in interface com.gs.collections.api.ByteIterablepublic long dotProduct(com.gs.collections.api.list.primitive.ByteList list)
dotProduct in interface com.gs.collections.api.list.primitive.ByteListpublic byte[] toArray()
toArray in interface com.gs.collections.api.ByteIterablepublic boolean equals(java.lang.Object otherList)
com.gs.collections.api.list.primitive.ByteListList.equals(Object).equals in interface com.gs.collections.api.list.primitive.ByteListequals in class java.lang.Objectpublic int hashCode()
com.gs.collections.api.list.primitive.ByteListList.hashCode().hashCode in interface com.gs.collections.api.list.primitive.ByteListhashCode in class java.lang.Objectpublic void appendString(java.lang.Appendable appendable,
java.lang.String start,
java.lang.String separator,
java.lang.String end)
com.gs.collections.api.PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String, String, String).appendString in interface com.gs.collections.api.PrimitiveIterablepublic com.gs.collections.api.list.primitive.MutableByteList asUnmodifiable()
asUnmodifiable in interface com.gs.collections.api.collection.primitive.MutableByteCollectionasUnmodifiable in interface com.gs.collections.api.list.primitive.MutableByteListpublic com.gs.collections.api.list.primitive.MutableByteList asSynchronized()
asSynchronized in interface com.gs.collections.api.collection.primitive.MutableByteCollectionasSynchronized in interface com.gs.collections.api.list.primitive.MutableByteListpublic com.gs.collections.api.list.primitive.ImmutableByteList toImmutable()
com.gs.collections.api.list.primitive.MutableByteListtoImmutable in interface com.gs.collections.api.collection.primitive.MutableByteCollectiontoImmutable in interface com.gs.collections.api.list.primitive.ByteListtoImmutable in interface com.gs.collections.api.list.primitive.MutableByteListpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException
readExternal in interface java.io.Externalizablejava.io.IOExceptionpublic com.gs.collections.api.LazyByteIterable asReversed()
asReversed in interface com.gs.collections.api.ordered.primitive.ReversibleByteIterablepublic ByteArrayList reverseThis()
reverseThis in interface com.gs.collections.api.list.primitive.MutableByteListpublic ByteArrayList sortThis()
com.gs.collections.api.list.primitive.MutableByteListsortThis in interface com.gs.collections.api.list.primitive.MutableByteListpublic ByteArrayList toReversed()
toReversed in interface com.gs.collections.api.list.primitive.ByteListtoReversed in interface com.gs.collections.api.list.primitive.MutableByteListtoReversed in interface com.gs.collections.api.ordered.primitive.ReversibleByteIterablepublic int binarySearch(byte value)
binarySearch in interface com.gs.collections.api.list.primitive.ByteListpublic com.gs.collections.api.list.primitive.MutableByteList distinct()
distinct in interface com.gs.collections.api.list.primitive.ByteListdistinct in interface com.gs.collections.api.list.primitive.MutableByteListdistinct in interface com.gs.collections.api.ordered.primitive.ReversibleByteIterablepublic com.gs.collections.api.list.primitive.MutableByteList subList(int fromIndex,
int toIndex)
subList in interface com.gs.collections.api.list.primitive.ByteListsubList in interface com.gs.collections.api.list.primitive.MutableByteListList#subList(int fromIndex, int toIndex)}