Serializable
, MutableLongCollection
, LongList
, MutableLongList
, LongIterable
, OrderedLongIterable
, ReversibleLongIterable
, PrimitiveIterable
public class SynchronizedLongList extends AbstractSynchronizedLongCollection implements MutableLongList
MutableLongList
. It is imperative that the user manually synchronize on the on the
collection when iterating over it using an iterator or stream.
This file was automatically generated from template file synchronizedPrimitiveList.stg.
MutableLongList.asSynchronized()
,
MutableList.asSynchronized()
,
Serialized FormConstructor | Description |
---|---|
SynchronizedLongList(MutableLongList list) |
|
SynchronizedLongList(MutableLongList list,
Object newLock) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
addAllAtIndex(int index,
long... source) |
|
boolean |
addAllAtIndex(int index,
LongIterable source) |
|
void |
addAtIndex(int index,
long element) |
|
LazyLongIterable |
asLazy() |
Returns a LazyLongIterable adapter wrapping the source LongIterable.
|
LazyLongIterable |
asReversed() |
|
MutableLongList |
asSynchronized() |
|
MutableLongList |
asUnmodifiable() |
|
int |
binarySearch(long value) |
|
<V> MutableList<V> |
collect(LongToObjectFunction<? extends V> function) |
Returns a new collection with the results of applying the specified function on each element of the source
collection.
|
<V> MutableList<V> |
collectWithIndex(LongIntToObjectFunction<? extends V> function) |
Returns a new MutableList using results obtained by applying the specified function to each element
and its corresponding index.
|
<V,R extends Collection<V>> |
collectWithIndex(LongIntToObjectFunction<? extends V> function,
R target) |
Adds elements to the target Collection using results obtained by applying the specified function to each element
and its corresponding index.
|
MutableLongList |
distinct() |
|
long |
dotProduct(LongList list) |
|
boolean |
equals(Object otherList) |
Follows the same general contract as
List.equals(Object) . |
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 |
injectIntoWithIndex(T injectedValue,
ObjectLongIntToObjectFunction<? super T,? extends T> function) |
|
int |
lastIndexOf(long value) |
|
MutableLongList |
newEmpty() |
Creates a new empty mutable version of the same List type.
|
MutableLongList |
reject(LongPredicate predicate) |
Returns a new LongIterable with all of the elements in the LongIterable that
return false for the specified predicate.
|
long |
removeAtIndex(int index) |
|
MutableLongList |
reverseThis() |
|
MutableLongList |
select(LongPredicate predicate) |
Returns a new LongIterable with all of the elements in the LongIterable that
return true for the specified predicate.
|
long |
set(int index,
long element) |
|
MutableLongList |
sortThis() |
Sorts this list mutating its contents and returns the same mutable list (this).
|
Spliterator.OfLong |
spliterator() |
This function needs to be synchronized manually
|
MutableLongList |
subList(int fromIndex,
int toIndex) |
|
ImmutableLongList |
toImmutable() |
Returns an immutable copy of this list.
|
MutableLongList |
toReversed() |
|
SynchronizedLongList |
with(long element) |
|
SynchronizedLongList |
withAll(LongIterable elements) |
|
SynchronizedLongList |
without(long element) |
|
SynchronizedLongList |
withoutAll(LongIterable elements) |
|
<T> MutableList<LongObjectPair<T>> |
zip(Iterable<T> iterable) |
Returns a
MutableList formed from this MutableLongList and a ListIterable by
combining corresponding elements in pairs. |
MutableList<LongLongPair> |
zipLong(LongIterable iterable) |
Returns a
MutableList formed from this MutableLongList and another LongList by
combining corresponding elements in pairs. |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, chunk, clear, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, isEmpty, longIterator, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, reduce, reduceIfEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, size, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toString
allSatisfy, anySatisfy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, injectInto, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedList
primitiveParallelStream, primitiveStream
add, addAll, addAll, clear, longIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAll
tap
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
public SynchronizedLongList(MutableLongList list)
public SynchronizedLongList(MutableLongList list, Object newLock)
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 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 long removeAtIndex(int index)
removeAtIndex
in interface MutableLongList
public long set(int index, long element)
set
in interface MutableLongList
public SynchronizedLongList with(long element)
with
in interface MutableLongCollection
with
in interface MutableLongList
with
in class AbstractSynchronizedLongCollection
public SynchronizedLongList without(long element)
without
in interface MutableLongCollection
without
in interface MutableLongList
without
in class AbstractSynchronizedLongCollection
public SynchronizedLongList withAll(LongIterable elements)
withAll
in interface MutableLongCollection
withAll
in interface MutableLongList
withAll
in class AbstractSynchronizedLongCollection
public SynchronizedLongList withoutAll(LongIterable elements)
withoutAll
in interface MutableLongCollection
withoutAll
in interface MutableLongList
withoutAll
in class AbstractSynchronizedLongCollection
public MutableLongList select(LongPredicate predicate)
LongIterable
select
in interface LongIterable
select
in interface LongList
select
in interface MutableLongCollection
select
in interface MutableLongList
select
in interface OrderedLongIterable
select
in interface ReversibleLongIterable
select
in class AbstractSynchronizedLongCollection
public MutableLongList reject(LongPredicate predicate)
LongIterable
reject
in interface LongIterable
reject
in interface LongList
reject
in interface MutableLongCollection
reject
in interface MutableLongList
reject
in interface OrderedLongIterable
reject
in interface ReversibleLongIterable
reject
in class AbstractSynchronizedLongCollection
public <V> MutableList<V> collect(LongToObjectFunction<? extends V> function)
LongIterable
collect
in interface LongIterable
collect
in interface LongList
collect
in interface MutableLongCollection
collect
in interface MutableLongList
collect
in interface OrderedLongIterable
collect
in interface ReversibleLongIterable
collect
in class AbstractSynchronizedLongCollection
public MutableLongList sortThis()
MutableLongList
sortThis
in interface MutableLongList
public int binarySearch(long value)
binarySearch
in interface LongList
public long dotProduct(LongList list)
dotProduct
in interface LongList
public boolean equals(Object otherList)
LongList
List.equals(Object)
.public int hashCode()
LongList
List.hashCode()
.public LazyLongIterable asLazy()
LongIterable
asLazy
in interface LongIterable
asLazy
in class AbstractSynchronizedLongCollection
public MutableLongList asUnmodifiable()
asUnmodifiable
in interface MutableLongCollection
asUnmodifiable
in interface MutableLongList
asUnmodifiable
in class AbstractSynchronizedLongCollection
public MutableLongList asSynchronized()
asSynchronized
in interface MutableLongCollection
asSynchronized
in interface MutableLongList
asSynchronized
in class AbstractSynchronizedLongCollection
public ImmutableLongList toImmutable()
MutableLongList
toImmutable
in interface LongList
toImmutable
in interface MutableLongCollection
toImmutable
in interface MutableLongList
toImmutable
in class AbstractSynchronizedLongCollection
public MutableLongList newEmpty()
MutableLongList
newEmpty
in interface MutableLongCollection
newEmpty
in interface MutableLongList
public MutableLongList reverseThis()
reverseThis
in interface MutableLongList
public MutableLongList toReversed()
toReversed
in interface LongList
toReversed
in interface MutableLongList
toReversed
in interface ReversibleLongIterable
public LazyLongIterable asReversed()
asReversed
in interface ReversibleLongIterable
public void forEachWithIndex(LongIntProcedure procedure)
forEachWithIndex
in interface OrderedLongIterable
public <T> T injectIntoWithIndex(T injectedValue, ObjectLongIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex
in interface OrderedLongIterable
injectIntoWithIndex
in interface ReversibleLongIterable
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)
public MutableList<LongLongPair> zipLong(LongIterable iterable)
MutableLongList
MutableList
formed from this MutableLongList
and another LongList
by
combining corresponding elements in pairs. If one of the two LongList
s is longer than the other, its
remaining elements are ignored.zipLong
in interface LongList
zipLong
in interface MutableLongList
public <T> MutableList<LongObjectPair<T>> zip(Iterable<T> iterable)
MutableLongList
MutableList
formed from this MutableLongList
and a ListIterable
by
combining corresponding elements in pairs. If one of the two Lists is longer than the other, its
remaining elements are ignored.zip
in interface LongList
zip
in interface MutableLongList
public <V> MutableList<V> collectWithIndex(LongIntToObjectFunction<? extends V> function)
collectWithIndex
in interface LongList
collectWithIndex
in interface MutableLongList
collectWithIndex
in interface OrderedLongIterable
collectWithIndex
in interface ReversibleLongIterable
public <V,R extends Collection<V>> R collectWithIndex(LongIntToObjectFunction<? extends V> function, R target)
collectWithIndex
in interface OrderedLongIterable
public Spliterator.OfLong spliterator()
spliterator
in interface LongList
Copyright © 2004–2019. All rights reserved.