@NotThreadSafe public class LongArrayList extends AbstractLongIterable implements MutableLongList, Externalizable
FastList
, and is memory-optimized for long primitives.
This file was automatically generated from template file primitiveArrayList.stg.Constructor and Description |
---|
LongArrayList() |
LongArrayList(int initialCapacity) |
LongArrayList(long... array) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(long newItem) |
boolean |
addAll(long... source) |
boolean |
addAll(LongIterable source) |
boolean |
addAllAtIndex(int index,
long... source) |
boolean |
addAllAtIndex(int index,
LongIterable source) |
void |
addAtIndex(int index,
long element) |
boolean |
allSatisfy(LongPredicate predicate) |
boolean |
anySatisfy(LongPredicate predicate) |
void |
appendString(Appendable appendable,
String start,
String separator,
String end)
Prints a string representation of this collection onto the given
Appendable . |
LazyLongIterable |
asReversed() |
MutableLongList |
asSynchronized() |
MutableLongList |
asUnmodifiable() |
int |
binarySearch(long value) |
void |
clear() |
<V> MutableList<V> |
collect(LongToObjectFunction<? extends V> function) |
boolean |
contains(long value) |
int |
count(LongPredicate predicate) |
long |
detectIfNone(LongPredicate predicate,
long ifNone) |
MutableLongList |
distinct() |
long |
dotProduct(LongList list) |
void |
each(LongProcedure procedure) |
void |
ensureCapacity(int minCapacity) |
boolean |
equals(Object otherList)
Follows the same general contract as
List.equals(Object) . |
void |
forEach(LongProcedure procedure) |
void |
forEachWithIndex(LongIntProcedure procedure) |
long |
get(int index) |
long |
getFirst() |
long |
getLast() |
int |
hashCode()
Follows the same general contract as
List.hashCode() . |
int |
indexOf(long value) |
<T> T |
injectInto(T injectedValue,
ObjectLongToObjectFunction<? super T,? extends T> function) |
<T> T |
injectIntoWithIndex(T injectedValue,
ObjectLongIntToObjectFunction<? super T,? extends T> function) |
int |
lastIndexOf(long value) |
MutableLongIterator |
longIterator() |
long |
max() |
long |
min() |
static LongArrayList |
newList(LongIterable source) |
static LongArrayList |
newListWith(long... elements)
Creates a new list using the passed
elements argument as the backing store. |
static LongArrayList |
newWithNValues(int size,
long value) |
boolean |
noneSatisfy(LongPredicate predicate) |
void |
readExternal(ObjectInput in) |
LongArrayList |
reject(LongPredicate predicate) |
boolean |
remove(long value) |
boolean |
removeAll(long... source) |
boolean |
removeAll(LongIterable source) |
long |
removeAtIndex(int index) |
boolean |
retainAll(long... source) |
boolean |
retainAll(LongIterable source) |
LongArrayList |
reverseThis() |
LongArrayList |
select(LongPredicate predicate) |
long |
set(int index,
long element) |
int |
size()
Returns the number of items in this iterable.
|
LongArrayList |
sortThis()
Sorts this list mutating its contents and returns the same mutable list (this).
|
MutableLongList |
subList(int fromIndex,
int toIndex) |
long |
sum() |
long[] |
toArray() |
ImmutableLongList |
toImmutable()
Returns an immutable copy of this list.
|
LongArrayList |
toReversed() |
void |
trimToSize() |
LongArrayList |
with(long element) |
LongArrayList |
with(long element1,
long element2) |
LongArrayList |
with(long element1,
long element2,
long element3) |
LongArrayList |
with(long element1,
long element2,
long element3,
long... elements) |
LongArrayList |
withAll(LongIterable elements) |
LongArrayList |
without(long element) |
LongArrayList |
withoutAll(LongIterable elements) |
void |
writeExternal(ObjectOutput out) |
asLazy, average, containsAll, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toString
asLazy, average, containsAll, containsAll, maxIfEmpty, median, minIfEmpty, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
public LongArrayList()
public LongArrayList(int initialCapacity)
public LongArrayList(long... array)
public static LongArrayList newListWith(long... 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 LongArrayList newList(LongIterable source)
public static LongArrayList newWithNValues(int size, long value)
public int size()
PrimitiveIterable
size
in interface PrimitiveIterable
public void clear()
clear
in interface MutableLongCollection
public boolean contains(long value)
contains
in interface LongIterable
public long getFirst()
getFirst
in interface OrderedLongIterable
public long getLast()
getLast
in interface ReversibleLongIterable
public int indexOf(long value)
indexOf
in interface OrderedLongIterable
public int lastIndexOf(long value)
lastIndexOf
in interface LongList
public void trimToSize()
public void ensureCapacity(int minCapacity)
public boolean add(long newItem)
add
in interface MutableLongCollection
public boolean addAll(long... source)
addAll
in interface MutableLongCollection
public boolean addAll(LongIterable source)
addAll
in interface MutableLongCollection
public void addAtIndex(int index, long element)
addAtIndex
in interface MutableLongList
public boolean addAllAtIndex(int index, long... source)
addAllAtIndex
in interface MutableLongList
public boolean addAllAtIndex(int index, LongIterable source)
addAllAtIndex
in interface MutableLongList
public boolean remove(long value)
remove
in interface MutableLongCollection
public boolean removeAll(LongIterable source)
removeAll
in interface MutableLongCollection
public boolean removeAll(long... source)
removeAll
in interface MutableLongCollection
public boolean retainAll(LongIterable source)
retainAll
in interface MutableLongCollection
Collection.retainAll(Collection)
public boolean retainAll(long... source)
retainAll
in interface MutableLongCollection
Collection.retainAll(Collection)
public long removeAtIndex(int index)
removeAtIndex
in interface MutableLongList
public long set(int index, long element)
set
in interface MutableLongList
public LongArrayList with(long element)
with
in interface MutableLongCollection
with
in interface MutableLongList
public LongArrayList without(long element)
without
in interface MutableLongCollection
without
in interface MutableLongList
public LongArrayList withAll(LongIterable elements)
withAll
in interface MutableLongCollection
withAll
in interface MutableLongList
public LongArrayList withoutAll(LongIterable elements)
withoutAll
in interface MutableLongCollection
withoutAll
in interface MutableLongList
public LongArrayList with(long element1, long element2)
public LongArrayList with(long element1, long element2, long element3)
public LongArrayList with(long element1, long element2, long element3, long... elements)
public MutableLongIterator longIterator()
longIterator
in interface MutableLongCollection
longIterator
in interface LongIterable
public void forEach(LongProcedure procedure)
forEach
in interface LongIterable
public void each(LongProcedure procedure)
each
in interface LongIterable
public void forEachWithIndex(LongIntProcedure procedure)
forEachWithIndex
in interface OrderedLongIterable
public <T> T injectInto(T injectedValue, ObjectLongToObjectFunction<? super T,? extends T> function)
injectInto
in interface LongIterable
public <T> T injectIntoWithIndex(T injectedValue, ObjectLongIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex
in interface OrderedLongIterable
injectIntoWithIndex
in interface ReversibleLongIterable
public int count(LongPredicate predicate)
count
in interface LongIterable
public boolean anySatisfy(LongPredicate predicate)
anySatisfy
in interface LongIterable
public boolean allSatisfy(LongPredicate predicate)
allSatisfy
in interface LongIterable
public boolean noneSatisfy(LongPredicate predicate)
noneSatisfy
in interface LongIterable
public LongArrayList select(LongPredicate predicate)
select
in interface MutableLongCollection
select
in interface LongList
select
in interface MutableLongList
select
in interface LongIterable
select
in interface OrderedLongIterable
select
in interface ReversibleLongIterable
public LongArrayList reject(LongPredicate predicate)
reject
in interface MutableLongCollection
reject
in interface LongList
reject
in interface MutableLongList
reject
in interface LongIterable
reject
in interface OrderedLongIterable
reject
in interface ReversibleLongIterable
public long detectIfNone(LongPredicate predicate, long ifNone)
detectIfNone
in interface LongIterable
public <V> MutableList<V> collect(LongToObjectFunction<? extends V> function)
collect
in interface MutableLongCollection
collect
in interface LongList
collect
in interface MutableLongList
collect
in interface LongIterable
collect
in interface OrderedLongIterable
collect
in interface ReversibleLongIterable
public long max()
max
in interface LongIterable
public long min()
min
in interface LongIterable
public long sum()
sum
in interface LongIterable
public long dotProduct(LongList list)
dotProduct
in interface LongList
public long[] toArray()
toArray
in interface LongIterable
public boolean equals(Object otherList)
LongList
List.equals(Object)
.public int hashCode()
LongList
List.hashCode()
.public void appendString(Appendable appendable, String start, String separator, String end)
PrimitiveIterable
Appendable
. Prints the string returned
by PrimitiveIterable.makeString(String, String, String)
.appendString
in interface PrimitiveIterable
public MutableLongList asUnmodifiable()
asUnmodifiable
in interface MutableLongCollection
asUnmodifiable
in interface MutableLongList
public MutableLongList asSynchronized()
asSynchronized
in interface MutableLongCollection
asSynchronized
in interface MutableLongList
public ImmutableLongList toImmutable()
MutableLongList
toImmutable
in interface MutableLongCollection
toImmutable
in interface LongList
toImmutable
in interface MutableLongList
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException
readExternal
in interface Externalizable
IOException
public LazyLongIterable asReversed()
asReversed
in interface ReversibleLongIterable
public LongArrayList reverseThis()
reverseThis
in interface MutableLongList
public LongArrayList sortThis()
MutableLongList
sortThis
in interface MutableLongList
public LongArrayList toReversed()
toReversed
in interface LongList
toReversed
in interface MutableLongList
toReversed
in interface ReversibleLongIterable
public int binarySearch(long value)
binarySearch
in interface LongList
public MutableLongList distinct()
distinct
in interface LongList
distinct
in interface MutableLongList
distinct
in interface ReversibleLongIterable
public MutableLongList subList(int fromIndex, int toIndex)
subList
in interface LongList
subList
in interface MutableLongList
List#subList(int fromIndex, int toIndex)}
Copyright © 2004–2016. All rights reserved.