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

public Class SynchronizedIntList

extends AbstractSynchronizedIntCollection
implements MutableIntList
Class Inheritance
All Implemented Interfaces
org.eclipse.collections.api.list.primitive.MutableIntList, org.eclipse.collections.api.list.primitive.IntList, org.eclipse.collections.api.ordered.primitive.ReversibleIntIterable, org.eclipse.collections.api.ordered.primitive.OrderedIntIterable, org.eclipse.collections.api.IntIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.MutableIntCollection
Imports
java.util.Collection, .Comparator, .Random, .Spliterator, org.eclipse.collections.api.IntIterable, .LazyIntIterable, org.eclipse.collections.api.block.comparator.primitive.IntComparator, org.eclipse.collections.api.block.function.primitive.IntIntToObjectFunction, .IntToObjectFunction, .ObjectIntIntToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.IntIntPredicate, .IntPredicate, org.eclipse.collections.api.block.procedure.primitive.IntIntProcedure, org.eclipse.collections.api.collection.primitive.MutableIntCollection, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.list.primitive.IntList, .ImmutableIntList, .MutableIntList, org.eclipse.collections.api.stack.primitive.MutableIntStack, org.eclipse.collections.api.tuple.primitive.IntIntPair, .IntObjectPair, org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedIntCollection, org.eclipse.collections.impl.factory.primitive.IntLists, .IntStacks, org.eclipse.collections.impl.lazy.primitive.LazyIntIterableAdapter, .ReverseIntIterable, org.eclipse.collections.impl.list.mutable.SynchronizedMutableList

A synchronized view of a MutableIntList. 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
MutableIntList#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 LazyIntIterable
public LazyIntIterable
public MutableIntList
public MutableIntList
public int
public MutableList<Integer>
public <V> MutableList<V>
public <V> MutableList<V>
collectWithIndex(IntIntToObjectFunction<? extends V> function)

Overrides default org.eclipse.collections.api.list.primitive.MutableIntList.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(IntIntToObjectFunction<? extends V> function, R target)

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

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

public MutableIntList
public long
public boolean
public void
forEachInBoth(IntList other, IntIntProcedure procedure)

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

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

public void
public int
public int
public int
private MutableIntList
public int
public int
public <T> T
public int
public MutableIntList
public MutableIntList
public MutableIntList
rejectWithIndex(IntIntPredicate predicate)

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

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

public <R extends MutableIntCollection> R
rejectWithIndex(IntIntPredicate predicate, R target)

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

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

public int
public MutableIntList
public MutableIntList
public MutableIntList
selectWithIndex(IntIntPredicate predicate)

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

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

public <R extends MutableIntCollection> R
selectWithIndex(IntIntPredicate predicate, R target)

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

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

public int
public MutableIntList
shuffleThis()

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

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

public MutableIntList
shuffleThis(Random rnd)

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

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

public MutableIntList
sortThis()

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

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

public MutableIntList
sortThis(IntComparator comparator)

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

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

public <T> MutableIntList
sortThisBy(IntToObjectFunction<T> function)

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

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

public <T> MutableIntList
sortThisBy(IntToObjectFunction<T> function, Comparator<? super T> comparator)

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

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

public Spliterator.OfInt
spliterator()

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

This function needs to be synchronized manually

public MutableIntList
public ImmutableIntList
public MutableIntList
public MutableIntStack
toStack()

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

Converts the collection to a IntStack.

public SynchronizedIntList
public SynchronizedIntList
public SynchronizedIntList
public SynchronizedIntList
public <T> MutableList<IntObjectPair<T>>
zip(Iterable<T> iterable)

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

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

public MutableList<IntIntPair>
zipInt(IntIterable iterable)

Overrides default org.eclipse.collections.api.list.primitive.MutableIntList.zipInt.

Returns a MutableList formed from this MutableIntList and another IntList by combining corresponding elements in pairs.

Inherited from org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedIntCollection:
addaddAlladdAllallSatisfyanySatisfyappendStringappendStringappendStringaveragechunkclearcontainscontainsAllcontainsAllcontainsAnycontainsAnycontainsNonecontainsNonecountdetectIfNoneeachgetIntCollectiongetLockinjectIntointIteratorisEmptymakeStringmakeStringmakeStringmaxmaxIfEmptymedianminminIfEmptynoneSatisfynotEmptyreducereduceIfEmptyremoveremoveAllremoveAllremoveIfretainAllretainAllsizesumtoArraytoArraytoBagtoListtoSettoSortedArraytoSortedListtoString

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

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

Constructor Detail

SynchronizedIntListback to summary
public SynchronizedIntList(MutableIntList list)
SynchronizedIntListback to summary
public SynchronizedIntList(MutableIntList list, Object newLock)

Method Detail

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

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

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

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

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

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

Annotations
@Override
asLazyback to summary
public LazyIntIterable asLazy()

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

Implements org.eclipse.collections.api.IntIterable.asLazy.

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

Returns a LazyIntIterable adapter wrapping the source IntIterable.

Annotations
@Override
asReversedback to summary
public LazyIntIterable asReversed()

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

Annotations
@Override
asSynchronizedback to summary
public MutableIntList asSynchronized()

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

Implements org.eclipse.collections.api.list.primitive.MutableIntList.asSynchronized, org.eclipse.collections.api.collection.primitive.MutableIntCollection.asSynchronized.

Annotations
@Override
asUnmodifiableback to summary
public MutableIntList asUnmodifiable()

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

Implements org.eclipse.collections.api.list.primitive.MutableIntList.asUnmodifiable, org.eclipse.collections.api.collection.primitive.MutableIntCollection.asUnmodifiable.

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

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

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

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

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

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

Implements org.eclipse.collections.api.list.primitive.MutableIntList.collect, org.eclipse.collections.api.collection.primitive.MutableIntCollection.collect.

Doc from org.eclipse.collections.api.IntIterable.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(IntIntToObjectFunction<? extends V> function)

Overrides default org.eclipse.collections.api.list.primitive.MutableIntList.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(IntIntToObjectFunction<? extends V> function, R target)

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedIntIterable.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 MutableIntList distinct()

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

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

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

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

Overrides java.lang.Object.equals.

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

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

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

Annotations
@Override
forEachInBothback to summary
public void forEachInBoth(IntList other, IntIntProcedure procedure)

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

Doc from org.eclipse.collections.api.list.primitive.IntList.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(IntIntProcedure procedure)

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

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

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

Annotations
@Override
getFirstback to summary
public int getFirst()

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

Annotations
@Override
getLastback to summary
public int getLast()

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

Annotations
@Override
getMutableIntListback to summary
private MutableIntList getMutableIntList()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

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

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

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

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

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

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

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

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

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

Annotations
@Override
newEmptyback to summary
public MutableIntList newEmpty()

Overrides default org.eclipse.collections.api.list.primitive.MutableIntList.newEmpty, org.eclipse.collections.api.collection.primitive.MutableIntCollection.newEmpty.

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

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

Since
9.2.
rejectback to summary
public MutableIntList reject(IntPredicate predicate)

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

Implements org.eclipse.collections.api.list.primitive.MutableIntList.reject, org.eclipse.collections.api.collection.primitive.MutableIntCollection.reject.

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

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

Annotations
@Override
rejectWithIndexback to summary
public MutableIntList rejectWithIndex(IntIntPredicate predicate)

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

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

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

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

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

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

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

Annotations
@Override
reverseThisback to summary
public MutableIntList reverseThis()

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

Annotations
@Override
selectback to summary
public MutableIntList select(IntPredicate predicate)

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

Implements org.eclipse.collections.api.list.primitive.MutableIntList.select, org.eclipse.collections.api.collection.primitive.MutableIntCollection.select.

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

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

Annotations
@Override
selectWithIndexback to summary
public MutableIntList selectWithIndex(IntIntPredicate predicate)

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

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

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

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

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

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

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

Annotations
@Override
shuffleThisback to summary
public MutableIntList shuffleThis()

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

Doc from org.eclipse.collections.api.list.primitive.MutableIntList.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 MutableIntList shuffleThis(Random rnd)

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

Doc from org.eclipse.collections.api.list.primitive.MutableIntList.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 MutableIntList sortThis()

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

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

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

Annotations
@Override
sortThisback to summary
public MutableIntList sortThis(IntComparator comparator)

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

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

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

Annotations
@Override
sortThisByback to summary
public <T> MutableIntList sortThisBy(IntToObjectFunction<T> function)

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

Doc from org.eclipse.collections.api.list.primitive.MutableIntList.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> MutableIntList sortThisBy(IntToObjectFunction<T> function, Comparator<? super T> comparator)

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

Doc from org.eclipse.collections.api.list.primitive.MutableIntList.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.OfInt spliterator()

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

This function needs to be synchronized manually

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

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

Annotations
@Override
toImmutableback to summary
public ImmutableIntList toImmutable()

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

Implements org.eclipse.collections.api.list.primitive.MutableIntList.toImmutable, org.eclipse.collections.api.collection.primitive.MutableIntCollection.toImmutable.

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

Returns an immutable copy of this list.

Annotations
@Override
toReversedback to summary
public MutableIntList toReversed()

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

Annotations
@Override
toStackback to summary
public MutableIntStack toStack()

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

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

Converts the collection to a IntStack.

Annotations
@Override
withback to summary
public SynchronizedIntList with(int element)

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

Implements org.eclipse.collections.api.list.primitive.MutableIntList.with, org.eclipse.collections.api.collection.primitive.MutableIntCollection.with.

Annotations
@Override
withAllback to summary
public SynchronizedIntList withAll(IntIterable elements)

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

Implements org.eclipse.collections.api.list.primitive.MutableIntList.withAll, org.eclipse.collections.api.collection.primitive.MutableIntCollection.withAll.

Annotations
@Override
withoutback to summary
public SynchronizedIntList without(int element)

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

Implements org.eclipse.collections.api.list.primitive.MutableIntList.without, org.eclipse.collections.api.collection.primitive.MutableIntCollection.without.

Annotations
@Override
withoutAllback to summary
public SynchronizedIntList withoutAll(IntIterable elements)

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

Implements org.eclipse.collections.api.list.primitive.MutableIntList.withoutAll, org.eclipse.collections.api.collection.primitive.MutableIntCollection.withoutAll.

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

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

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

Returns a MutableList formed from this MutableIntList 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.
zipIntback to summary
public MutableList<IntIntPair> zipInt(IntIterable iterable)

Overrides default org.eclipse.collections.api.list.primitive.MutableIntList.zipInt.

Doc from org.eclipse.collections.api.list.primitive.MutableIntList.zipInt.

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

Since
9.1.