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

public Class UnmodifiableSortedSet<T>

extends AbstractUnmodifiableMutableCollection<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, .Comparator, .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.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.tuple.Pair, org.eclipse.collections.impl.collection.mutable.AbstractUnmodifiableMutableCollection, .UnmodifiableCollectionSerializationProxy

An unmodifiable view of a SortedSet.
See Also
MutableSortedSet#asUnmodifiable()

Constructor Summary

AccessConstructor and Description
pack-priv
UnmodifiableSortedSet(MutableSortedSet<? extends T> sortedSet)

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 LazyIterable<T>
asReversed()

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

Returns a reversed view of this ReversibleIterable.

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 UnmodifiableSortedSet<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.AbstractUnmodifiableMutableCollection.collect.

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.collect, org.eclipse.collections.api.collection.MutableCollection.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)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractUnmodifiableMutableCollection.collectBoolean.

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

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

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

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

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.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.AbstractUnmodifiableMutableCollection.collectChar.

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

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

Overrides org.eclipse.collections.impl.collection.mutable.AbstractUnmodifiableMutableCollection.collectDouble.

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

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

Overrides org.eclipse.collections.impl.collection.mutable.AbstractUnmodifiableMutableCollection.collectFloat.

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

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

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

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.collectIf, org.eclipse.collections.api.collection.MutableCollection.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.AbstractUnmodifiableMutableCollection.collectInt.

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

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.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.AbstractUnmodifiableMutableCollection.collectLong.

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

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

Overrides org.eclipse.collections.impl.collection.mutable.AbstractUnmodifiableMutableCollection.collectShort.

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

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

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

public <P, A> MutableList<A>
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 boolean
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 <V> MutableSortedSetMultimap<V, T>
groupBy(Function<? super T, ? extends V> function)

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

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.groupBy, org.eclipse.collections.api.collection.MutableCollection.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 int
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>> UnmodifiableSortedSet<E>
of(S set)

Hides java.util.Set.of.

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

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>
rejectWith(Predicate2<? super T, ? super P> predicate, P parameter)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractUnmodifiableMutableCollection.rejectWith.

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

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

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>
selectWith(Predicate2<? super T, ? super P> predicate, P parameter)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractUnmodifiableMutableCollection.selectWith.

Implements org.eclipse.collections.api.set.sorted.MutableSortedSet.selectWith, org.eclipse.collections.api.collection.MutableCollection.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)

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

public MutableSortedSet<T>
with(T element)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractUnmodifiableMutableCollection.with.

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

Implements org.eclipse.collections.api.collection.MutableCollection.with.

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

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

Overrides org.eclipse.collections.impl.collection.mutable.AbstractUnmodifiableMutableCollection.withAll.

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

Implements org.eclipse.collections.api.collection.MutableCollection.withAll.

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

public MutableSortedSet<T>
without(T element)

Overrides org.eclipse.collections.impl.collection.mutable.AbstractUnmodifiableMutableCollection.without.

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

Implements org.eclipse.collections.api.collection.MutableCollection.without.

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

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

Overrides org.eclipse.collections.impl.collection.mutable.AbstractUnmodifiableMutableCollection.withoutAll.

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

Implements org.eclipse.collections.api.collection.MutableCollection.withoutAll.

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

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

Overrides org.eclipse.collections.impl.collection.mutable.AbstractUnmodifiableMutableCollection.zip.

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

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

public <S, R extends Collection<Pair<T, S>>> R
public MutableSortedSet<Pair<T, Integer>>
public <R extends Collection<Pair<T, Integer>>> R
Inherited from org.eclipse.collections.impl.collection.mutable.AbstractUnmodifiableMutableCollection:
addaddAlladdAllIterableallSatisfyallSatisfyWithanySatisfyanySatisfyWithappendStringappendStringappendStringasLazychunkclearcollectcollectBooleancollectBytecollectCharcollectDoublecollectFloatcollectIfcollectIntcollectLongcollectShortcollectWithcontainscontainsAllcontainsAllArgumentscontainsAllIterablecontainsAnycontainsAnyIterablecontainsNonecontainsNoneIterablecountcountWithdetectdetectIfNonedetectOptionaldetectWithdetectWithIfNonedetectWithOptionaleachflatCollectflatCollectBooleanflatCollectByteflatCollectCharflatCollectDoubleflatCollectFloatflatCollectIntflatCollectLongflatCollectShortforEachWithforEachWithIndexgetFirstgetLastgetMutableCollectiongetOnlygroupBygroupByEachgroupByUniqueKeygroupByUniqueKeyinjectIntoinjectIntoinjectIntoinjectIntoinjectIntoinjectIntoWithintoisEmptyiteratormakeStringmakeStringmakeStringmaxmaxmaxByminminminBynoneSatisfynoneSatisfyWithnotEmptyrejectrejectWithremoveremoveAllremoveAllIterableremoveIfremoveIfWithretainAllretainAllIterableselectselectAndRejectWithselectWithsizesumByDoublesumByFloatsumByIntsumByLongsumOfDoublesumOfFloatsumOfIntsumOfLongtoArraytoArraytoBagtoBiMaptoListtoMaptoMaptoSettoSortedBagtoSortedBagtoSortedListtoSortedListtoSortedMaptoSortedMaptoSortedMapBytoSortedSettoSortedSettoString