Top Description Methods
org.eclipse.collections.api.set.sorted

public Interface MutableSortedSet<T>

extends MutableSetIterable<T>, SortedSetIterable<T>, SortedSet<T>, Cloneable
Imports
java.util.SortedSet, 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.procedure.Procedure, 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.partition.set.sorted.PartitionMutableSortedSet, org.eclipse.collections.api.set.MutableSetIterable, .SetIterable, org.eclipse.collections.api.tuple.Pair

A MutableSortedSet is an implementation of a JCF SortedSet which provides methods matching the Smalltalk Collection protocol.
Since
1.0

Method Summary

Modifier and TypeMethod and Description
public MutableSortedSet<T>
asSynchronized()

Redeclares org.eclipse.collections.api.collection.MutableCollection.asSynchronized.

Returns a synchronized wrapper backed by this collection.

public MutableSortedSet<T>

Returns:

an unmodifiable view of this set
asUnmodifiable
()

Redeclares org.eclipse.collections.api.collection.MutableCollection.asUnmodifiable.

Returns an unmodifiable view of the set.

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

Redeclares org.eclipse.collections.api.RichIterable.collect, org.eclipse.collections.api.collection.MutableCollection.collect, org.eclipse.collections.api.set.sorted.SortedSetIterable.collect.

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

public MutableBooleanList
collectBoolean(BooleanFunction<? super T> booleanFunction)

Redeclares org.eclipse.collections.api.RichIterable.collectBoolean, org.eclipse.collections.api.set.sorted.SortedSetIterable.collectBoolean.

Redeclares as abstract: org.eclipse.collections.api.collection.MutableCollection.collectBoolean.

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

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

Redeclares org.eclipse.collections.api.RichIterable.collectByte, org.eclipse.collections.api.set.sorted.SortedSetIterable.collectByte.

Redeclares as abstract: org.eclipse.collections.api.collection.MutableCollection.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)

Redeclares org.eclipse.collections.api.RichIterable.collectChar, org.eclipse.collections.api.set.sorted.SortedSetIterable.collectChar.

Redeclares as abstract: org.eclipse.collections.api.collection.MutableCollection.collectChar.

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

public MutableDoubleList
collectDouble(DoubleFunction<? super T> doubleFunction)

Redeclares org.eclipse.collections.api.RichIterable.collectDouble, org.eclipse.collections.api.set.sorted.SortedSetIterable.collectDouble.

Redeclares as abstract: org.eclipse.collections.api.collection.MutableCollection.collectDouble.

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

public MutableFloatList
collectFloat(FloatFunction<? super T> floatFunction)

Redeclares org.eclipse.collections.api.RichIterable.collectFloat, org.eclipse.collections.api.set.sorted.SortedSetIterable.collectFloat.

Redeclares as abstract: org.eclipse.collections.api.collection.MutableCollection.collectFloat.

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

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

Redeclares org.eclipse.collections.api.RichIterable.collectIf, org.eclipse.collections.api.collection.MutableCollection.collectIf, org.eclipse.collections.api.set.sorted.SortedSetIterable.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)

Redeclares org.eclipse.collections.api.RichIterable.collectInt, org.eclipse.collections.api.set.sorted.SortedSetIterable.collectInt.

Redeclares as abstract: org.eclipse.collections.api.collection.MutableCollection.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)

Redeclares org.eclipse.collections.api.RichIterable.collectLong, org.eclipse.collections.api.set.sorted.SortedSetIterable.collectLong.

Redeclares as abstract: org.eclipse.collections.api.collection.MutableCollection.collectLong.

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

public MutableShortList
collectShort(ShortFunction<? super T> shortFunction)

Redeclares org.eclipse.collections.api.RichIterable.collectShort, org.eclipse.collections.api.set.sorted.SortedSetIterable.collectShort.

Redeclares as abstract: org.eclipse.collections.api.collection.MutableCollection.collectShort.

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

public <P, V> MutableList<V>
collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter)

Redeclares org.eclipse.collections.api.RichIterable.collectWith, org.eclipse.collections.api.collection.MutableCollection.collectWith, org.eclipse.collections.api.set.sorted.SortedSetIterable.collectWith.

Same as collect(Function) with a Function2 and specified parameter which is passed to the block.

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

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

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

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

Redeclares org.eclipse.collections.api.set.SetIterable.difference, org.eclipse.collections.api.set.sorted.SortedSetIterable.difference.

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

public MutableSortedSet<T>
distinct()

Redeclares org.eclipse.collections.api.set.sorted.SortedSetIterable.distinct.

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

public MutableSortedSet<T>
drop(int count)

Redeclares org.eclipse.collections.api.set.sorted.SortedSetIterable.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)

Redeclares org.eclipse.collections.api.set.sorted.SortedSetIterable.dropWhile.

Returns the final elements that do not satisfy the Predicate.

public <V> MutableList<V>
public default <P, V> MutableList<V>
flatCollectWith(Function2<? super T, ? super P, ? extends Iterable<V>> function, P parameter)

Overrides default org.eclipse.collections.api.RichIterable.flatCollectWith, org.eclipse.collections.api.collection.MutableCollection.flatCollectWith, org.eclipse.collections.api.set.sorted.SortedSetIterable.flatCollectWith.

Same as flatCollect, only with a Function2 that is passed an extra parameter.

public default T
getFirst()

Overrides default java.util.SortedSet.getFirst.

Implements org.eclipse.collections.api.RichIterable.getFirst, org.eclipse.collections.api.ordered.OrderedIterable.getFirst.

This default override exists because java.util.SortedSet added a default getFirst() method in Java 21.

public default T
getLast()

Overrides default java.util.SortedSet.getLast.

Implements org.eclipse.collections.api.RichIterable.getLast, org.eclipse.collections.api.ordered.OrderedIterable.getLast.

This default override exists because java.util.SortedSet added a default getLast() method in Java 21.

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

Redeclares org.eclipse.collections.api.set.MutableSetIterable.groupBy, org.eclipse.collections.api.set.sorted.SortedSetIterable.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>
groupByEach(Function<? super T, ? extends Iterable<V>> function)

Redeclares org.eclipse.collections.api.set.MutableSetIterable.groupByEach, org.eclipse.collections.api.set.sorted.SortedSetIterable.groupByEach.

Similar to groupBy(Function), except the result of evaluating function will return a collection of keys for each value.

public MutableSortedSet<T>
headSet(T toElement)

Redeclares java.util.SortedSet.headSet.

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

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

Redeclares org.eclipse.collections.api.set.SetIterable.intersect, org.eclipse.collections.api.set.sorted.SortedSetIterable.intersect.

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

public MutableSortedSet<T>
newEmpty()

Redeclares org.eclipse.collections.api.collection.MutableCollection.newEmpty.

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

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

Redeclares org.eclipse.collections.api.set.MutableSetIterable.partition, org.eclipse.collections.api.set.sorted.SortedSetIterable.partition.

Filters a collection into a PartitionedIterable based on the evaluation of the predicate.

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

Redeclares org.eclipse.collections.api.set.sorted.SortedSetIterable.partitionWhile.

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

public <P> PartitionMutableSortedSet<T>
partitionWith(Predicate2<? super T, ? super P> predicate, P parameter)

Redeclares org.eclipse.collections.api.set.MutableSetIterable.partitionWith, org.eclipse.collections.api.set.sorted.SortedSetIterable.partitionWith.

Filters a collection into a PartitionIterable based on the evaluation of the predicate.

public MutableSortedSet<SortedSetIterable<T>>
powerSet()

Redeclares org.eclipse.collections.api.set.sorted.SortedSetIterable.powerSet.

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

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

Redeclares org.eclipse.collections.api.set.MutableSetIterable.reject, org.eclipse.collections.api.set.sorted.SortedSetIterable.reject.

Returns a MutableCollection with all elements that evaluate to false for the specified predicate.

public <P> MutableSortedSet<T>
rejectWith(Predicate2<? super T, ? super P> predicate, P parameter)

Redeclares org.eclipse.collections.api.set.MutableSetIterable.rejectWith, org.eclipse.collections.api.set.sorted.SortedSetIterable.rejectWith.

Returns a MutableCollection with all elements that evaluate to false for the specified predicate2 and parameter.

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

Redeclares org.eclipse.collections.api.set.MutableSetIterable.select, org.eclipse.collections.api.set.sorted.SortedSetIterable.select.

Returns a MutableCollection with all elements that evaluate to true for the specified predicate.

public <S> MutableSortedSet<S>
selectInstancesOf(Class<S> clazz)

Redeclares org.eclipse.collections.api.set.MutableSetIterable.selectInstancesOf, org.eclipse.collections.api.set.sorted.SortedSetIterable.selectInstancesOf.

Returns all elements of the source collection that are instances of the Class clazz.

public <P> MutableSortedSet<T>
selectWith(Predicate2<? super T, ? super P> predicate, P parameter)

Redeclares org.eclipse.collections.api.set.MutableSetIterable.selectWith, org.eclipse.collections.api.set.sorted.SortedSetIterable.selectWith.

Returns a MutableCollection with all elements that evaluate to true for the specified predicate2 and parameter.

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

Redeclares java.util.SortedSet.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)

Redeclares org.eclipse.collections.api.set.SetIterable.symmetricDifference, org.eclipse.collections.api.set.sorted.SortedSetIterable.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 MutableSortedSet<T>
tailSet(T fromElement)

Redeclares java.util.SortedSet.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)

Redeclares org.eclipse.collections.api.set.sorted.SortedSetIterable.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)

Redeclares org.eclipse.collections.api.set.sorted.SortedSetIterable.takeWhile.

Returns the initial elements that satisfy the Predicate.

public MutableSortedSet<T>
tap(Procedure<? super T> procedure)

Redeclares org.eclipse.collections.api.set.MutableSetIterable.tap, org.eclipse.collections.api.set.sorted.SortedSetIterable.tap.

Executes the Procedure for each element in the iterable and returns this.

public ImmutableSortedSet<T>
public default ImmutableSortedSet<T>
toImmutableSortedSet()

Overrides default org.eclipse.collections.api.RichIterable.toImmutableSortedSet.

Converts the RichIterable to the default ImmutableSortedSet implementation.

public MutableSortedSet<T>
toReversed()

Redeclares org.eclipse.collections.api.set.sorted.SortedSetIterable.toReversed.

Returns a new ReversibleIterable in reverse order.

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

Redeclares org.eclipse.collections.api.set.SetIterable.union, org.eclipse.collections.api.set.sorted.SortedSetIterable.union.

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

public default MutableSortedSet<T>
with(T element)

Overrides default org.eclipse.collections.api.set.MutableSetIterable.with.

This method allows mutable and fixed size collections the ability to add elements to their existing elements.

public default MutableSortedSet<T>
withAll(Iterable<? extends T> elements)

Overrides default org.eclipse.collections.api.set.MutableSetIterable.withAll.

This method allows mutable and fixed size collections the ability to add multiple elements to their existing elements.

public default MutableSortedSet<T>
without(T element)

Overrides default org.eclipse.collections.api.set.MutableSetIterable.without.

This method allows mutable and fixed size collections the ability to remove elements from their existing elements.

public default MutableSortedSet<T>
withoutAll(Iterable<? extends T> elements)

Overrides default org.eclipse.collections.api.set.MutableSetIterable.withoutAll.

This method allows mutable and fixed size collections the ability to remove multiple elements from their existing elements.

public <S> MutableList<Pair<T, S>>
zip(Iterable<S> that)

Redeclares org.eclipse.collections.api.set.MutableSetIterable.zip, org.eclipse.collections.api.RichIterable.zip, org.eclipse.collections.api.ordered.SortedIterable.zip, org.eclipse.collections.api.ordered.ReversibleIterable.zip.

Returns a RichIterable formed from this RichIterable and another RichIterable by combining corresponding elements in pairs.

public MutableSortedSet<Pair<T, Integer>>
Inherited from java.util.SortedSet:
addFirstaddLastcomparatorfirstlastremoveFirstremoveLastreversedspliterator
Inherited from org.eclipse.collections.api.set.MutableSetIterable:
toArraytoArray
Inherited from org.eclipse.collections.api.set.sorted.SortedSetIterable:
asParallelcomparator