public class LongArrayList extends AbstractLongIterable implements MutableLongList, Externalizable
| 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) |
LazyLongIterable |
asReversed() |
MutableLongList |
asSynchronized() |
MutableLongList |
asUnmodifiable() |
int |
binarySearch(long value) |
RichIterable<LongIterable> |
chunk(int size) |
void |
clear() |
<V> MutableList<V> |
collect(LongToObjectFunction<? extends V> function) |
<V,R extends Collection<V>> |
collect(LongToObjectFunction<? extends V> function,
R target) |
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) |
void |
forEachWithIndex(LongIntProcedure procedure) |
long |
get(int index) |
long |
getFirst() |
long |
getLast() |
int |
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() |
LongArrayList |
newEmpty()
Creates a new empty LongArrayList.
|
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) |
void |
readExternal(ObjectInput in) |
LongArrayList |
reject(LongPredicate predicate) |
<R extends MutableLongCollection> |
reject(LongPredicate predicate,
R target) |
boolean |
remove(long value) |
boolean |
removeAll(long... source) |
boolean |
removeAll(LongIterable source) |
long |
removeAtIndex(int index) |
boolean |
removeIf(LongPredicate predicate) |
boolean |
retainAll(long... source) |
boolean |
retainAll(LongIterable source) |
LongArrayList |
reverseThis() |
LongArrayList |
select(LongPredicate predicate) |
<R extends MutableLongCollection> |
select(LongPredicate predicate,
R target) |
long |
set(int index,
long element) |
int |
size() |
LongArrayList |
sortThis() |
LongArrayList |
sortThis(LongComparator comparator) |
Spliterator.OfLong |
spliterator() |
MutableLongList |
subList(int fromIndex,
int toIndex) |
long |
sum() |
void |
swap(int index1,
int index2) |
long[] |
toArray() |
long[] |
toArray(long[] target) |
ImmutableLongList |
toImmutable() |
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) |
static LongArrayList |
wrapCopy(long... array)
Creates a new list by first copying the array passed in.
|
void |
writeExternal(ObjectOutput out) |
<T> MutableList<LongObjectPair<T>> |
zip(Iterable<T> iterable) |
MutableList<LongLongPair> |
zipLong(LongIterable iterable) |
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringcollectWithIndex, rejectWithIndex, selectWithIndex, shuffleThis, shuffleThis, sortThisBy, sortThisBy, tapforEachInBoth, primitiveParallelStream, primitiveStreamcollectWithIndex, 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 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 static LongArrayList wrapCopy(long... array)
public int size()
size in interface PrimitiveIterablepublic void clear()
clear in interface MutableLongCollectionpublic boolean contains(long value)
contains in interface LongIterablepublic long getFirst()
getFirst in interface OrderedLongIterablepublic long getLast()
getLast in interface ReversibleLongIterablepublic int indexOf(long value)
indexOf in interface OrderedLongIterablepublic int lastIndexOf(long value)
lastIndexOf in interface LongListpublic void trimToSize()
public void ensureCapacity(int minCapacity)
public boolean add(long newItem)
add in interface MutableLongCollectionpublic boolean addAll(long... source)
addAll in interface MutableLongCollectionpublic boolean addAll(LongIterable source)
addAll in interface MutableLongCollectionpublic void addAtIndex(int index,
long element)
addAtIndex in interface MutableLongListpublic boolean addAllAtIndex(int index,
long... source)
addAllAtIndex in interface MutableLongListpublic boolean addAllAtIndex(int index,
LongIterable source)
addAllAtIndex in interface MutableLongListpublic boolean remove(long value)
remove in interface MutableLongCollectionpublic boolean removeIf(LongPredicate predicate)
removeIf in interface MutableLongCollectionpublic boolean removeAll(LongIterable source)
removeAll in interface MutableLongCollectionpublic boolean removeAll(long... source)
removeAll in interface MutableLongCollectionpublic boolean retainAll(LongIterable source)
retainAll in interface MutableLongCollectionpublic boolean retainAll(long... source)
retainAll in interface MutableLongCollectionpublic long removeAtIndex(int index)
removeAtIndex in interface MutableLongListpublic long set(int index,
long element)
set in interface MutableLongListpublic void swap(int index1,
int index2)
swap in interface MutableLongListpublic LongArrayList with(long element)
with in interface MutableLongCollectionwith in interface MutableLongListpublic LongArrayList without(long element)
without in interface MutableLongCollectionwithout in interface MutableLongListpublic LongArrayList withAll(LongIterable elements)
withAll in interface MutableLongCollectionwithAll in interface MutableLongListpublic LongArrayList withoutAll(LongIterable elements)
withoutAll in interface MutableLongCollectionwithoutAll in interface MutableLongListpublic 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 MutableLongCollectionlongIterator in interface LongIterablepublic void each(LongProcedure procedure)
each in interface LongIterablepublic void forEachWithIndex(LongIntProcedure procedure)
forEachWithIndex in interface OrderedLongIterablepublic <T> T injectInto(T injectedValue,
ObjectLongToObjectFunction<? super T,? extends T> function)
injectInto in interface LongIterablepublic <T> T injectIntoWithIndex(T injectedValue,
ObjectLongIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex in interface OrderedLongIterableinjectIntoWithIndex in interface ReversibleLongIterablepublic RichIterable<LongIterable> chunk(int size)
chunk in interface LongIterablepublic int count(LongPredicate predicate)
count in interface LongIterablepublic boolean anySatisfy(LongPredicate predicate)
anySatisfy in interface LongIterablepublic boolean allSatisfy(LongPredicate predicate)
allSatisfy in interface LongIterablepublic LongArrayList select(LongPredicate predicate)
select in interface MutableLongCollectionselect in interface LongListselect in interface MutableLongListselect in interface LongIterableselect in interface OrderedLongIterableselect in interface ReversibleLongIterablepublic <R extends MutableLongCollection> R select(LongPredicate predicate, R target)
select in interface LongIterablepublic LongArrayList reject(LongPredicate predicate)
reject in interface MutableLongCollectionreject in interface LongListreject in interface MutableLongListreject in interface LongIterablereject in interface OrderedLongIterablereject in interface ReversibleLongIterablepublic <R extends MutableLongCollection> R reject(LongPredicate predicate, R target)
reject in interface LongIterablepublic long detectIfNone(LongPredicate predicate, long ifNone)
detectIfNone in interface LongIterablepublic <V> MutableList<V> collect(LongToObjectFunction<? extends V> function)
collect in interface MutableLongCollectioncollect in interface LongListcollect in interface MutableLongListcollect in interface LongIterablecollect in interface OrderedLongIterablecollect in interface ReversibleLongIterablepublic <V,R extends Collection<V>> R collect(LongToObjectFunction<? extends V> function, R target)
collect in interface LongIterablepublic long max()
max in interface LongIterablepublic long min()
min in interface LongIterablepublic long sum()
sum in interface LongIterablepublic long dotProduct(LongList list)
dotProduct in interface LongListpublic long[] toArray()
toArray in interface LongIterablepublic long[] toArray(long[] target)
toArray in interface LongIterablepublic boolean equals(Object otherList)
public int hashCode()
public void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface PrimitiveIterablepublic MutableLongList asUnmodifiable()
asUnmodifiable in interface MutableLongCollectionasUnmodifiable in interface MutableLongListpublic MutableLongList asSynchronized()
asSynchronized in interface MutableLongCollectionasSynchronized in interface MutableLongListpublic ImmutableLongList toImmutable()
toImmutable in interface MutableLongCollectiontoImmutable in interface LongListtoImmutable in interface MutableLongListpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizableIOExceptionpublic LazyLongIterable asReversed()
asReversed in interface ReversibleLongIterablepublic LongArrayList reverseThis()
reverseThis in interface MutableLongListpublic LongArrayList sortThis()
sortThis in interface MutableLongListpublic LongArrayList sortThis(LongComparator comparator)
sortThis in interface MutableLongListpublic LongArrayList toReversed()
toReversed in interface LongListtoReversed in interface MutableLongListtoReversed in interface ReversibleLongIterablepublic int binarySearch(long value)
binarySearch in interface LongListpublic MutableLongList distinct()
distinct in interface LongListdistinct in interface MutableLongListdistinct in interface ReversibleLongIterablepublic MutableLongList subList(int fromIndex, int toIndex)
subList in interface LongListsubList in interface MutableLongListpublic MutableList<LongLongPair> zipLong(LongIterable iterable)
zipLong in interface LongListzipLong in interface MutableLongListpublic LongArrayList newEmpty()
newEmpty in interface MutableLongCollectionnewEmpty in interface MutableLongListpublic <T> MutableList<LongObjectPair<T>> zip(Iterable<T> iterable)
zip in interface LongListzip in interface MutableLongListpublic Spliterator.OfLong spliterator()
spliterator in interface LongListCopyright © 2004–2022. All rights reserved.