Top Description Fields Constructors Methods
org.eclipse.collections.impl.set.sorted.mutable

public Class SynchronizedSortedSet<T>

extends AbstractSynchronizedMutableCollection<T>
implements MutableSortedSet<T>, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.eclipse.collections.api.set.sorted.MutableSortedSet, java.lang.Cloneable, java.util.SortedSet, java.util.SequencedSet, java.util.Set, java.util.Collection, java.lang.Iterable, java.util.SequencedCollection, org.eclipse.collections.api.set.sorted.SortedSetIterable, org.eclipse.collections.api.ordered.ReversibleIterable, org.eclipse.collections.api.ordered.OrderedIterable, org.eclipse.collections.api.RichIterable, org.eclipse.collections.api.InternalIterable, org.eclipse.collections.api.ordered.SortedIterable, java.lang.Comparable, org.eclipse.collections.api.set.SetIterable, org.eclipse.collections.api.set.MutableSetIterable, org.eclipse.collections.api.collection.MutableCollection
Imports
java.io.Serializable, java.util.Collection, .Collections, .Comparator, .Optional, .Set, .SortedSet, java.util.concurrent.ExecutorService, org.eclipse.collections.api.LazyIterable, org.eclipse.collections.api.block.function.Function, .Function2, org.eclipse.collections.api.block.function.primitive.BooleanFunction, .ByteFunction, .CharFunction, .DoubleFunction, .FloatFunction, .IntFunction, .LongFunction, .ObjectIntToObjectFunction, .ShortFunction, org.eclipse.collections.api.block.predicate.Predicate, .Predicate2, org.eclipse.collections.api.block.predicate.primitive.ObjectIntPredicate, org.eclipse.collections.api.block.procedure.Procedure, org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure, org.eclipse.collections.api.factory.SortedSets, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.list.primitive.MutableBooleanList, .MutableByteList, .MutableCharList, .MutableDoubleList, .MutableFloatList, .MutableIntList, .MutableLongList, .MutableShortList, org.eclipse.collections.api.multimap.sortedset.MutableSortedSetMultimap, org.eclipse.collections.api.ordered.OrderedIterable, org.eclipse.collections.api.partition.set.sorted.PartitionMutableSortedSet, org.eclipse.collections.api.set.SetIterable, org.eclipse.collections.api.set.sorted.ImmutableSortedSet, .MutableSortedSet, .ParallelSortedSetIterable, .SortedSetIterable, org.eclipse.collections.api.stack.MutableStack, org.eclipse.collections.api.tuple.Pair, org.eclipse.collections.impl.collection.mutable.AbstractSynchronizedMutableCollection, .SynchronizedCollectionSerializationProxy, org.eclipse.collections.impl.lazy.parallel.set.sorted.SynchronizedParallelSortedSetIterable, org.eclipse.collections.impl.stack.mutable.ArrayStack

A synchronized view of a MutableSortedSet. It is imperative that the user manually synchronize on the collection when iterating over it using the standard JDK iterator or JDK 5 for loop, as per Collections#synchronizedCollection(Collection).
See Also
MutableSortedSet#asSynchronized()

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ParallelSortedSetIterable<T>
asParallel(ExecutorService executorService, int batchSize)

Implements org.eclipse.collections.api.set.SetIterable.asParallel, org.eclipse.collections.api.set.sorted.SortedSetIterable.asParallel.

Returns a parallel iterable of this SortedSetIterable.

public MutableSortedSet<T>
public MutableSortedSet<T>
public <B> LazyIterable<Pair<T, B>>
cartesianProduct(SetIterable<B> set)

Implements org.eclipse.collections.api.set.SetIterable.cartesianProduct.

Returns the set whose members are all possible ordered pairs (a, b) where a is a member of this and b is a member of set.

public MutableSortedSet<T>
clone()

Overrides java.lang.Object.clone.

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.clone.

Creates and returns a copy of this object.

public <V> MutableList<V>
collect(Function<? super T, ? extends V> function)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractSynchronizedMutableCollection.collect.

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.collect, org.eclipse.collections.api.collection.MutableCollection.collect, org.eclipse.collections.api.RichIterable.collect.

Returns a new MutableCollection with the results of applying the specified function to each element of the source collection.

public MutableBooleanList
public MutableByteList
collectByte(ByteFunction<? super T> byteFunction)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractSynchronizedMutableCollection.collectByte.

Overrides default org.eclipse.collections.api.collection.MutableCollection.collectByte.

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.collectByte, org.eclipse.collections.api.RichIterable.collectByte.

Returns a new primitive byte iterable with the results of applying the specified function on each element of the source collection.

public MutableCharList
collectChar(CharFunction<? super T> charFunction)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractSynchronizedMutableCollection.collectChar.

Overrides default org.eclipse.collections.api.collection.MutableCollection.collectChar.

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.collectChar, org.eclipse.collections.api.RichIterable.collectChar.

Returns a new primitive char iterable with the results of applying the specified function on each element of the source collection.

public MutableDoubleList
public MutableFloatList
public <V> MutableList<V>
collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractSynchronizedMutableCollection.collectIf.

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.collectIf, org.eclipse.collections.api.collection.MutableCollection.collectIf, org.eclipse.collections.api.RichIterable.collectIf.

Returns a new MutableCollection with the results of applying the specified function to each element of the source collection, but only for elements that evaluate to true for the specified predicate.

public MutableIntList
collectInt(IntFunction<? super T> intFunction)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractSynchronizedMutableCollection.collectInt.

Overrides default org.eclipse.collections.api.collection.MutableCollection.collectInt.

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.collectInt, org.eclipse.collections.api.RichIterable.collectInt.

Returns a new primitive int iterable with the results of applying the specified function on each element of the source collection.

public MutableLongList
collectLong(LongFunction<? super T> longFunction)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractSynchronizedMutableCollection.collectLong.

Overrides default org.eclipse.collections.api.collection.MutableCollection.collectLong.

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.collectLong, org.eclipse.collections.api.RichIterable.collectLong.

Returns a new primitive long iterable with the results of applying the specified function on each element of the source collection.

public MutableShortList
public <P, V> MutableList<V>
public <V> MutableList<V>
collectWithIndex(ObjectIntToObjectFunction<? super T, ? extends V> function)

Overrides default org.eclipse.collections.api.set.sorted.MutableSortedSet.collectWithIndex.

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

public <V, R extends Collection<V>> R
collectWithIndex(ObjectIntToObjectFunction<? super T, ? extends V> function, R target)

Overrides default org.eclipse.collections.api.ordered.OrderedIterable.collectWithIndex.

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

public Comparator<? super T>
comparator()

Implements org.eclipse.collections.api.set.sorted.SortedSetIterable.comparator, java.util.SortedSet.comparator.

Returns the comparator used to order the elements in this set, or null if this set uses the natural ordering of its elements.

public int
compareTo(SortedSetIterable<T> o)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

public <S> boolean
corresponds(OrderedIterable<S> other, Predicate2<? super T, ? super S> predicate)

Implements org.eclipse.collections.api.ordered.OrderedIterable.corresponds.

Returns true if both OrderedIterables have the same length and predicate returns true for all corresponding elements e1 of this OrderedIterable and e2 of other.

public int
detectIndex(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.ordered.OrderedIterable.detectIndex.

Returns the index of the first element of the OrderedIterable for which the predicate evaluates to true.

public int
detectLastIndex(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.ordered.ReversibleIterable.detectLastIndex.

Returns the index of the last element of the ReversibleIterable for which the predicate evaluates to true.

public MutableSortedSet<T>
difference(SetIterable<? extends T> subtrahendSet)

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.difference.

Returns the set of all members of this that are not members of subtrahendSet.

public <R extends Set<T>> R
differenceInto(SetIterable<? extends T> subtrahendSet, R targetSet)

Implements org.eclipse.collections.api.set.SetIterable.differenceInto.

Same as difference(SetIterable) but adds all the objects to targetSet and returns it.

public MutableSortedSet<T>
distinct()

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.distinct.

Returns a new SortedIterable containing the distinct elements in this iterable.

public MutableSortedSet<T>
drop(int count)

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.drop.

Returns an iterable after skipping the first count elements or an empty iterable if the count is greater than the length of the iterable.

public MutableSortedSet<T>
dropWhile(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.dropWhile.

Returns the final elements that do not satisfy the Predicate.

public T
first()

Implements java.util.SortedSet.first.

Returns the first (lowest) element currently in this set.

public <V> MutableList<V>
public void
forEach(int startIndex, int endIndex, Procedure<? super T> procedure)

Implements org.eclipse.collections.api.ordered.OrderedIterable.forEach.

Iterates over the section of the iterable covered by the specified inclusive indexes.

public void
forEachWithIndex(int fromIndex, int toIndex, ObjectIntProcedure<? super T> objectIntProcedure)

Implements org.eclipse.collections.api.ordered.OrderedIterable.forEachWithIndex.

Iterates over the section of the iterable covered by the specified inclusive indexes.

protected MutableSortedSet<T>
public Optional<T>
getFirstOptional()

Overrides default org.eclipse.collections.api.ordered.OrderedIterable.getFirstOptional.

Returns the first element of an iterable as an Optional.

public Optional<T>
getLastOptional()

Overrides default org.eclipse.collections.api.ordered.OrderedIterable.getLastOptional.

Returns the last element of an iterable as an Optional.

public <V> MutableSortedSetMultimap<V, T>
groupBy(Function<? super T, ? extends V> function)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractSynchronizedMutableCollection.groupBy.

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.groupBy, org.eclipse.collections.api.collection.MutableCollection.groupBy, org.eclipse.collections.api.RichIterable.groupBy.

For each element of the iterable, the function is evaluated and the results of these evaluations are collected into a new multimap, where the transformed value is the key and the original values are added to the same (or similar) species of collection as the source iterable.

public <V> MutableSortedSetMultimap<V, T>
public MutableSortedSet<T>
headSet(T toElement)

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.headSet.

Returns a view of the portion of this set whose elements are strictly less than toElement.

public int
indexOf(Object object)

Overrides default org.eclipse.collections.api.ordered.OrderedIterable.indexOf.

Returns the index of the first occurrence of the specified item in this iterable, or -1 if this iterable does not contain the item.

public MutableSortedSet<T>
intersect(SetIterable<? extends T> set)

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.intersect.

Returns the set of all objects that are members of both this and set.

public <R extends Set<T>> R
intersectInto(SetIterable<? extends T> set, R targetSet)

Implements org.eclipse.collections.api.set.SetIterable.intersectInto.

Same as intersect(SetIterable) but adds all the objects to targetSet and returns it.

public boolean
isProperSubsetOf(SetIterable<? extends T> candidateSuperset)

Implements org.eclipse.collections.api.set.SetIterable.isProperSubsetOf.

Returns true if all the members of this are also members of candidateSuperset and the two sets are not equal.

public boolean
isSubsetOf(SetIterable<? extends T> candidateSuperset)

Implements org.eclipse.collections.api.set.SetIterable.isSubsetOf.

Returns true if all the members of this are also members of candidateSuperset.

public T
last()

Implements java.util.SortedSet.last.

Returns the last (highest) element currently in this set.

public MutableSortedSet<T>
public static <E, S extends SortedSet<E>> SynchronizedSortedSet<E>
of(S set)

Hides java.util.Set.of.

This method will take a MutableSortedSet and wrap it directly in a SynchronizedSortedSet.

public static <E, S extends SortedSet<E>> MutableSortedSet<E>
of(S set, Object lock)

Hides java.util.Set.of.

This method will take a MutableSortedSet and wrap it directly in a SynchronizedSortedSet.

public PartitionMutableSortedSet<T>
public PartitionMutableSortedSet<T>
partitionWhile(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.partitionWhile.

Returns a Partition of the initial elements that satisfy the Predicate and the remaining elements.

public <P> PartitionMutableSortedSet<T>
public MutableSortedSet<SortedSetIterable<T>>
powerSet()

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.powerSet.

Returns the set whose members are all possible subsets of this.

public MutableSortedSet<T>
public <P> MutableSortedSet<T>
public <R extends Collection<T>> R
rejectWithIndex(ObjectIntPredicate<? super T> predicate, R target)

Overrides default org.eclipse.collections.api.ordered.OrderedIterable.rejectWithIndex.

Adds all elements to the target Collection that return false when evaluating the specified predicate which is supplied each element and its relative index.

public void
reverseForEach(Procedure<? super T> procedure)

Overrides default org.eclipse.collections.api.ordered.ReversibleIterable.reverseForEach.

Evaluates the procedure for each element of the list iterating in reverse order.

public void
reverseForEachWithIndex(ObjectIntProcedure<? super T> procedure)

Overrides default org.eclipse.collections.api.ordered.ReversibleIterable.reverseForEachWithIndex.

Evaluates the procedure for each element and it's index in reverse order.

public MutableSortedSet<T>
public <S> MutableSortedSet<S>
public <P> MutableSortedSet<T>
public <R extends Collection<T>> R
selectWithIndex(ObjectIntPredicate<? super T> predicate, R target)

Overrides default org.eclipse.collections.api.ordered.OrderedIterable.selectWithIndex.

Adds all elements to the target Collection that return true when evaluating the specified predicate which is supplied each element and its relative index.

public MutableSortedSet<T>
subSet(T fromElement, T toElement)

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.subSet.

Returns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive.

public MutableSortedSet<T>
symmetricDifference(SetIterable<? extends T> setB)

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.symmetricDifference.

Returns the set of all objects that are a member of exactly one of this and setB (elements which are in one of the sets, but not in both).

public <R extends Set<T>> R
symmetricDifferenceInto(SetIterable<? extends T> set, R targetSet)

Implements org.eclipse.collections.api.set.SetIterable.symmetricDifferenceInto.

Same as symmetricDifference(SetIterable) but adds all the objects to targetSet and returns it.

public MutableSortedSet<T>
tailSet(T fromElement)

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.tailSet.

Returns a view of the portion of this set whose elements are greater than or equal to fromElement.

public MutableSortedSet<T>
take(int count)

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.take.

Returns the first count elements of the iterable or all the elements in the iterable if count is greater than the length of the iterable.

public MutableSortedSet<T>
takeWhile(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.takeWhile.

Returns the initial elements that satisfy the Predicate.

public MutableSortedSet<T>
public ImmutableSortedSet<T>
public MutableSortedSet<T>
toReversed()

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.toReversed.

Returns a new ReversibleIterable in reverse order.

public MutableStack<T>
toStack()

Overrides default org.eclipse.collections.api.ordered.OrderedIterable.toStack.

Converts the OrderedIterable to a mutable MutableStack implementation.

public MutableSortedSet<T>
union(SetIterable<? extends T> set)

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.union.

Returns the set of all objects that are a member of this or set or both.

public <R extends Set<T>> R
unionInto(SetIterable<? extends T> set, R targetSet)

Implements org.eclipse.collections.api.set.SetIterable.unionInto.

Same as union(SetIterable) but adds all the objects to targetSet and returns it.

protected Object
public <S> MutableList<Pair<T, S>>
public MutableSortedSet<Pair<T, Integer>>
Inherited from org.eclipse.collections.impl.collection.mutable.AbstractSynchronizedMutableCollection:
addaddAlladdAllIterableaggregateByaggregateInPlaceByclearcountBycountByEachcountByWithgroupByUniqueKeyinjectIntoWithremoveremoveAllremoveAllIterableremoveIfremoveIfWithretainAllretainAllIterableselectAndRejectWithsumByDoublesumByFloatsumByIntsumByLong