Top Description Fields Constructors Methods
org.eclipse.collections.impl.list.mutable.primitive

public Class SynchronizedLongList

extends AbstractSynchronizedLongCollection
implements MutableLongList
Class Inheritance
All Implemented Interfaces
org.eclipse.collections.api.list.primitive.MutableLongList, org.eclipse.collections.api.list.primitive.LongList, org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable, org.eclipse.collections.api.ordered.primitive.OrderedLongIterable, org.eclipse.collections.api.LongIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.MutableLongCollection
Imports
java.util.Collection, .Comparator, .Random, .Spliterator, org.eclipse.collections.api.LongIterable, .LazyLongIterable, org.eclipse.collections.api.block.comparator.primitive.LongComparator, org.eclipse.collections.api.block.function.primitive.LongIntToObjectFunction, .LongToObjectFunction, .ObjectLongIntToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.LongIntPredicate, .LongPredicate, org.eclipse.collections.api.block.procedure.primitive.LongLongProcedure, .LongIntProcedure, org.eclipse.collections.api.collection.primitive.MutableLongCollection, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.list.primitive.LongList, .ImmutableLongList, .MutableLongList, org.eclipse.collections.api.stack.primitive.MutableLongStack, org.eclipse.collections.api.tuple.primitive.LongLongPair, .LongObjectPair, org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedLongCollection, org.eclipse.collections.impl.factory.primitive.LongLists, .LongStacks, org.eclipse.collections.impl.lazy.primitive.LazyLongIterableAdapter, .ReverseLongIterable, org.eclipse.collections.impl.list.mutable.SynchronizedMutableList

A synchronized view of a 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.

Since
3.1.
See Also
MutableLongList#asSynchronized(), MutableList#asSynchronized()

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public void
public LazyLongIterable
public LazyLongIterable
public MutableLongList
public MutableLongList
public int
public MutableList<Long>
public <V> MutableList<V>
public <V> MutableList<V>
collectWithIndex(LongIntToObjectFunction<? extends V> function)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.collectWithIndex.

Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.

public <V, R extends Collection<V>> R
collectWithIndex(LongIntToObjectFunction<? extends V> function, R target)

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedLongIterable.collectWithIndex.

Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.

public MutableLongList
public long
public boolean
public void
forEachInBoth(LongList other, LongLongProcedure procedure)

Overrides default org.eclipse.collections.api.list.primitive.LongList.forEachInBoth.

This method iterates over two CharList instances of the same size together using the specified CharCharProcedure.

public void
public long
public long
public long
private MutableLongList
public int
public int
public <T> T
public int
public MutableLongList
public MutableLongList
public MutableLongList
rejectWithIndex(LongIntPredicate predicate)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.rejectWithIndex.

Returns a new MutableLongList excluding all elements with corresponding indexes matching the specified predicate.

public <R extends MutableLongCollection> R
rejectWithIndex(LongIntPredicate predicate, R target)

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedLongIterable.rejectWithIndex.

Returns a new MutableLongCollection excluding all elements with corresponding indexes matching the specified predicate.

public long
public MutableLongList
public MutableLongList
public MutableLongList
selectWithIndex(LongIntPredicate predicate)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.selectWithIndex.

Returns a new MutableLongList including all elements with corresponding indexes matching the specified predicate.

public <R extends MutableLongCollection> R
selectWithIndex(LongIntPredicate predicate, R target)

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedLongIterable.selectWithIndex.

Returns a new MutableLongCollection including all elements with corresponding indexes matching the specified predicate.

public long
public MutableLongList
shuffleThis()

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.shuffleThis.

Randomly permutes this list mutating its contents and returns the same list (this).

public MutableLongList
shuffleThis(Random rnd)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.shuffleThis.

Randomly permutes this list mutating its contents and returns the same list (this).

public MutableLongList
sortThis()

Implements org.eclipse.collections.api.list.primitive.MutableLongList.sortThis.

Sorts this list mutating its contents and returns the same mutable list (this).

public MutableLongList
sortThis(LongComparator comparator)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.sortThis.

Sorts the internal data structure of this list and returns the list itself as a convenience.

public <T> MutableLongList
sortThisBy(LongToObjectFunction<T> function)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.sortThisBy.

Sorts the internal data structure of this list based on the natural order of the key returned by function.

public <T> MutableLongList
sortThisBy(LongToObjectFunction<T> function, Comparator<? super T> comparator)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.sortThisBy.

Sorts the internal data structure of this list based on the key returned by function using the provided comparator.

public Spliterator.OfLong
spliterator()

Implements org.eclipse.collections.api.list.primitive.LongList.spliterator.

This function needs to be synchronized manually

public MutableLongList
public ImmutableLongList
public MutableLongList
public MutableLongStack
toStack()

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedLongIterable.toStack.

Converts the collection to a LongStack.

public SynchronizedLongList
public SynchronizedLongList
public SynchronizedLongList
public SynchronizedLongList
public <T> MutableList<LongObjectPair<T>>
zip(Iterable<T> iterable)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.zip.

Returns a MutableList formed from this MutableLongList and a ListIterable by combining corresponding elements in pairs.

public MutableList<LongLongPair>
zipLong(LongIterable iterable)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.zipLong.

Returns a MutableList formed from this MutableLongList and another LongList by combining corresponding elements in pairs.

Inherited from org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedLongCollection:
addaddAlladdAllallSatisfyanySatisfyappendStringappendStringappendStringaveragechunkclearcontainscontainsAllcontainsAllcontainsAnycontainsAnycontainsNonecontainsNonecountdetectIfNoneeachgetLockgetLongCollectioninjectIntoisEmptylongIteratormakeStringmakeStringmakeStringmaxmaxIfEmptymedianminminIfEmptynoneSatisfynotEmptyreducereduceIfEmptyremoveremoveAllremoveAllremoveIfretainAllretainAllsizesumtoArraytoArraytoBagtoListtoSettoSortedArraytoSortedListtoString

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedLongCollection.serialVersionUID.

Constructor Detail

SynchronizedLongListback to summary
public SynchronizedLongList(MutableLongList list)
SynchronizedLongListback to summary
public SynchronizedLongList(MutableLongList list, Object newLock)

Method Detail

addAllAtIndexback to summary
public boolean addAllAtIndex(int index, long... source)

Implements org.eclipse.collections.api.list.primitive.MutableLongList.addAllAtIndex.

Annotations
@Override
addAllAtIndexback to summary
public boolean addAllAtIndex(int index, LongIterable source)

Implements org.eclipse.collections.api.list.primitive.MutableLongList.addAllAtIndex.

Annotations
@Override
addAtIndexback to summary
public void addAtIndex(int index, long element)

Implements org.eclipse.collections.api.list.primitive.MutableLongList.addAtIndex.

Annotations
@Override
asLazyback to summary
public LazyLongIterable asLazy()

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedLongCollection.asLazy.

Implements org.eclipse.collections.api.LongIterable.asLazy.

Doc from org.eclipse.collections.api.LongIterable.asLazy.

Returns a LazyLongIterable adapter wrapping the source LongIterable.

Annotations
@Override
asReversedback to summary
public LazyLongIterable asReversed()

Implements org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable.asReversed.

Annotations
@Override
asSynchronizedback to summary
public MutableLongList asSynchronized()

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedLongCollection.asSynchronized.

Implements org.eclipse.collections.api.list.primitive.MutableLongList.asSynchronized, org.eclipse.collections.api.collection.primitive.MutableLongCollection.asSynchronized.

Annotations
@Override
asUnmodifiableback to summary
public MutableLongList asUnmodifiable()

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedLongCollection.asUnmodifiable.

Implements org.eclipse.collections.api.list.primitive.MutableLongList.asUnmodifiable, org.eclipse.collections.api.collection.primitive.MutableLongCollection.asUnmodifiable.

Annotations
@Override
binarySearchback to summary
public int binarySearch(long value)

Implements org.eclipse.collections.api.list.primitive.LongList.binarySearch.

Annotations
@Override
boxedback to summary
public MutableList<Long> boxed()

Implements org.eclipse.collections.api.list.primitive.MutableLongList.boxed.

Annotations
@Override
collectback to summary
public <V> MutableList<V> collect(LongToObjectFunction<? extends V> function)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedLongCollection.collect.

Implements org.eclipse.collections.api.list.primitive.MutableLongList.collect, org.eclipse.collections.api.collection.primitive.MutableLongCollection.collect.

Doc from org.eclipse.collections.api.LongIterable.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.

Annotations
@Override
collectWithIndexback to summary
public <V> MutableList<V> collectWithIndex(LongIntToObjectFunction<? extends V> function)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.collectWithIndex.

Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.

Annotations
@Override
Since
9.1.
collectWithIndexback to summary
public <V, R extends Collection<V>> R collectWithIndex(LongIntToObjectFunction<? extends V> function, R target)

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedLongIterable.collectWithIndex.

Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.

Since
9.1.
distinctback to summary
public MutableLongList distinct()

Implements org.eclipse.collections.api.list.primitive.MutableLongList.distinct.

Annotations
@Override
Since
6.0.
dotProductback to summary
public long dotProduct(LongList list)

Implements org.eclipse.collections.api.list.primitive.LongList.dotProduct.

Annotations
@Override
equalsback to summary
public boolean equals(Object otherList)

Overrides java.lang.Object.equals.

Implements org.eclipse.collections.api.list.primitive.LongList.equals.

Doc from org.eclipse.collections.api.list.primitive.LongList.equals.

Follows the same general contract as java.util.List#equals(Object).

Annotations
@Override
forEachInBothback to summary
public void forEachInBoth(LongList other, LongLongProcedure procedure)

Overrides default org.eclipse.collections.api.list.primitive.LongList.forEachInBoth.

Doc from org.eclipse.collections.api.list.primitive.LongList.forEachInBoth.

This method iterates over two CharList instances of the same size together using the specified CharCharProcedure.

Annotations
@Override
forEachWithIndexback to summary
public void forEachWithIndex(LongIntProcedure procedure)

Implements org.eclipse.collections.api.ordered.primitive.OrderedLongIterable.forEachWithIndex.

Annotations
@Override
getback to summary
public long get(int index)

Implements org.eclipse.collections.api.list.primitive.LongList.get.

Annotations
@Override
getFirstback to summary
public long getFirst()

Implements org.eclipse.collections.api.ordered.primitive.OrderedLongIterable.getFirst.

Annotations
@Override
getLastback to summary
public long getLast()

Implements org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable.getLast.

Annotations
@Override
getMutableLongListback to summary
private MutableLongList getMutableLongList()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Implements org.eclipse.collections.api.list.primitive.LongList.hashCode.

Doc from org.eclipse.collections.api.list.primitive.LongList.hashCode.

Follows the same general contract as java.util.List#hashCode().

Annotations
@Override
indexOfback to summary
public int indexOf(long value)

Implements org.eclipse.collections.api.ordered.primitive.OrderedLongIterable.indexOf.

Annotations
@Override
injectIntoWithIndexback to summary
public <T> T injectIntoWithIndex(T injectedValue, ObjectLongIntToObjectFunction<? super T, ? extends T> function)

Implements org.eclipse.collections.api.ordered.primitive.ReversibleLongIterable.injectIntoWithIndex.

Annotations
@Override
lastIndexOfback to summary
public int lastIndexOf(long value)

Implements org.eclipse.collections.api.list.primitive.LongList.lastIndexOf.

Annotations
@Override
newEmptyback to summary
public MutableLongList newEmpty()

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.newEmpty, org.eclipse.collections.api.collection.primitive.MutableLongCollection.newEmpty.

Doc from org.eclipse.collections.api.list.primitive.MutableLongList.newEmpty.

Creates a new empty mutable version of the same List type.

Since
9.2.
rejectback to summary
public MutableLongList reject(LongPredicate predicate)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedLongCollection.reject.

Implements org.eclipse.collections.api.list.primitive.MutableLongList.reject, org.eclipse.collections.api.collection.primitive.MutableLongCollection.reject.

Doc from org.eclipse.collections.api.LongIterable.reject.

Returns a new LongIterable with all of the elements in the LongIterable that return false for the specified predicate.

Annotations
@Override
rejectWithIndexback to summary
public MutableLongList rejectWithIndex(LongIntPredicate predicate)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.rejectWithIndex.

Returns a new MutableLongList excluding all elements with corresponding indexes matching the specified predicate.

Since
11.1.
rejectWithIndexback to summary
public <R extends MutableLongCollection> R rejectWithIndex(LongIntPredicate predicate, R target)

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedLongIterable.rejectWithIndex.

Returns a new MutableLongCollection excluding all elements with corresponding indexes matching the specified predicate.

Since
11.1.
removeAtIndexback to summary
public long removeAtIndex(int index)

Implements org.eclipse.collections.api.list.primitive.MutableLongList.removeAtIndex.

Annotations
@Override
reverseThisback to summary
public MutableLongList reverseThis()

Implements org.eclipse.collections.api.list.primitive.MutableLongList.reverseThis.

Annotations
@Override
selectback to summary
public MutableLongList select(LongPredicate predicate)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedLongCollection.select.

Implements org.eclipse.collections.api.list.primitive.MutableLongList.select, org.eclipse.collections.api.collection.primitive.MutableLongCollection.select.

Doc from org.eclipse.collections.api.LongIterable.select.

Returns a new LongIterable with all of the elements in the LongIterable that return true for the specified predicate.

Annotations
@Override
selectWithIndexback to summary
public MutableLongList selectWithIndex(LongIntPredicate predicate)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.selectWithIndex.

Returns a new MutableLongList including all elements with corresponding indexes matching the specified predicate.

Since
11.1.
selectWithIndexback to summary
public <R extends MutableLongCollection> R selectWithIndex(LongIntPredicate predicate, R target)

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedLongIterable.selectWithIndex.

Returns a new MutableLongCollection including all elements with corresponding indexes matching the specified predicate.

Since
11.1.
setback to summary
public long set(int index, long element)

Implements org.eclipse.collections.api.list.primitive.MutableLongList.set.

Annotations
@Override
shuffleThisback to summary
public MutableLongList shuffleThis()

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.shuffleThis.

Doc from org.eclipse.collections.api.list.primitive.MutableLongList.shuffleThis.

Randomly permutes this list mutating its contents and returns the same list (this). Uses java.util.Random as the source of randomness.

Annotations
@Override
shuffleThisback to summary
public MutableLongList shuffleThis(Random rnd)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.shuffleThis.

Doc from org.eclipse.collections.api.list.primitive.MutableLongList.shuffleThis.

Randomly permutes this list mutating its contents and returns the same list (this). Implements the Fisher-Yates shuffle algorithm using the provided source of randomness.

Annotations
@Override
sortThisback to summary
public MutableLongList sortThis()

Implements org.eclipse.collections.api.list.primitive.MutableLongList.sortThis.

Doc from org.eclipse.collections.api.list.primitive.MutableLongList.sortThis.

Sorts this list mutating its contents and returns the same mutable list (this).

Annotations
@Override
sortThisback to summary
public MutableLongList sortThis(LongComparator comparator)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.sortThis.

Doc from org.eclipse.collections.api.list.primitive.MutableLongList.sortThis.

Sorts the internal data structure of this list and returns the list itself as a convenience.

Annotations
@Override
sortThisByback to summary
public <T> MutableLongList sortThisBy(LongToObjectFunction<T> function)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.sortThisBy.

Doc from org.eclipse.collections.api.list.primitive.MutableLongList.sortThisBy.

Sorts the internal data structure of this list based on the natural order of the key returned by function.

Annotations
@Override
sortThisByback to summary
public <T> MutableLongList sortThisBy(LongToObjectFunction<T> function, Comparator<? super T> comparator)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.sortThisBy.

Doc from org.eclipse.collections.api.list.primitive.MutableLongList.sortThisBy.

Sorts the internal data structure of this list based on the key returned by function using the provided comparator.

Annotations
@Override
spliteratorback to summary
public Spliterator.OfLong spliterator()

Implements org.eclipse.collections.api.list.primitive.LongList.spliterator.

This function needs to be synchronized manually

Annotations
@Override
subListback to summary
public MutableLongList subList(int fromIndex, int toIndex)

Implements org.eclipse.collections.api.list.primitive.MutableLongList.subList.

Annotations
@Override
toImmutableback to summary
public ImmutableLongList toImmutable()

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedLongCollection.toImmutable.

Implements org.eclipse.collections.api.list.primitive.MutableLongList.toImmutable, org.eclipse.collections.api.collection.primitive.MutableLongCollection.toImmutable.

Doc from org.eclipse.collections.api.list.primitive.MutableLongList.toImmutable.

Returns an immutable copy of this list.

Annotations
@Override
toReversedback to summary
public MutableLongList toReversed()

Implements org.eclipse.collections.api.list.primitive.MutableLongList.toReversed.

Annotations
@Override
toStackback to summary
public MutableLongStack toStack()

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedLongIterable.toStack.

Doc from org.eclipse.collections.api.ordered.primitive.OrderedLongIterable.toStack.

Converts the collection to a LongStack.

Annotations
@Override
withback to summary
public SynchronizedLongList with(long element)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedLongCollection.with.

Implements org.eclipse.collections.api.list.primitive.MutableLongList.with, org.eclipse.collections.api.collection.primitive.MutableLongCollection.with.

Annotations
@Override
withAllback to summary
public SynchronizedLongList withAll(LongIterable elements)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedLongCollection.withAll.

Implements org.eclipse.collections.api.list.primitive.MutableLongList.withAll, org.eclipse.collections.api.collection.primitive.MutableLongCollection.withAll.

Annotations
@Override
withoutback to summary
public SynchronizedLongList without(long element)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedLongCollection.without.

Implements org.eclipse.collections.api.list.primitive.MutableLongList.without, org.eclipse.collections.api.collection.primitive.MutableLongCollection.without.

Annotations
@Override
withoutAllback to summary
public SynchronizedLongList withoutAll(LongIterable elements)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedLongCollection.withoutAll.

Implements org.eclipse.collections.api.list.primitive.MutableLongList.withoutAll, org.eclipse.collections.api.collection.primitive.MutableLongCollection.withoutAll.

Annotations
@Override
zipback to summary
public <T> MutableList<LongObjectPair<T>> zip(Iterable<T> iterable)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.zip.

Doc from org.eclipse.collections.api.list.primitive.MutableLongList.zip.

Returns a 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.

Since
9.1.
zipLongback to summary
public MutableList<LongLongPair> zipLong(LongIterable iterable)

Overrides default org.eclipse.collections.api.list.primitive.MutableLongList.zipLong.

Doc from org.eclipse.collections.api.list.primitive.MutableLongList.zipLong.

Returns a MutableList formed from this MutableLongList and another LongList by combining corresponding elements in pairs. If one of the two LongLists is longer than the other, its remaining elements are ignored.

Since
9.1.