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

public Interface ImmutableSortedSet<T>

extends SortedSetIterable<T>, ImmutableSetIterable<T>
Imports
java.util.Set, .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.ImmutableList, org.eclipse.collections.api.list.primitive.ImmutableBooleanList, .ImmutableByteList, .ImmutableCharList, .ImmutableDoubleList, .ImmutableFloatList, .ImmutableIntList, .ImmutableLongList, .ImmutableShortList, org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap, org.eclipse.collections.api.partition.set.sorted.PartitionImmutableSortedSet, org.eclipse.collections.api.set.ImmutableSetIterable, .SetIterable, org.eclipse.collections.api.tuple.Pair

ImmutableSortedSet is the non-modifiable equivalent interface to MutableSortedSet. MutableSortedSet#toImmutable() will give you an appropriately trimmed implementation of ImmutableSortedSet. All ImmutableSortedSet implementations must implement the SortedSet interface in order to satisfy the Set#equals(Object) contract and be compared against other Sets.

Method Summary

Modifier and TypeMethod and Description
public SortedSet<T>
public <V> ImmutableList<V>
collect(Function<? super T, ? extends V> function)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Redeclares org.eclipse.collections.api.set.sorted.SortedSetIterable.collectIf, org.eclipse.collections.api.RichIterable.collectIf, org.eclipse.collections.api.collection.ImmutableCollection.collectIf.

Returns a new collection with the results of applying the specified function on each element of the source collection, but only for those elements which return true upon evaluation of the predicate.

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

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

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

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

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

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

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

Redeclares org.eclipse.collections.api.set.sorted.SortedSetIterable.collectShort, org.eclipse.collections.api.RichIterable.collectShort, org.eclipse.collections.api.collection.ImmutableCollection.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> ImmutableList<V>
collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter)

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

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

public default <V> ImmutableList<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 ImmutableSortedSet<T>
difference(SetIterable<? extends T> subtrahendSet)

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

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

public ImmutableSortedSet<T>
distinct()

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

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

public ImmutableSortedSet<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 ImmutableSortedSet<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> ImmutableList<V>
public default <P, V> ImmutableList<V>
flatCollectWith(Function2<? super T, ? super P, ? extends Iterable<V>> function, P parameter)

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

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

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

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

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

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

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

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

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

public ImmutableSortedSet<T>
newWith(T element)

Redeclares org.eclipse.collections.api.collection.ImmutableCollection.newWith.

This method is similar to the with method in MutableCollection with the difference that a new copy of this collection with the element appended will be returned.

public ImmutableSortedSet<T>
newWithAll(Iterable<? extends T> elements)

Redeclares org.eclipse.collections.api.collection.ImmutableCollection.newWithAll.

This method is similar to the withAll method in MutableCollection with the difference that a new copy of this collection with the elements appended will be returned.

public ImmutableSortedSet<T>
newWithout(T element)

Redeclares org.eclipse.collections.api.collection.ImmutableCollection.newWithout.

This method is similar to the without method in MutableCollection with the difference that a new copy of this collection with the element removed will be returned.

public ImmutableSortedSet<T>
newWithoutAll(Iterable<? extends T> elements)

Redeclares org.eclipse.collections.api.collection.ImmutableCollection.newWithoutAll.

This method is similar to the withoutAll method in MutableCollection with the difference that a new copy of this collection with the elements removed will be returned.

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

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

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

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

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

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

public ImmutableSortedSet<SortedSetIterable<T>>
powerSet()

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

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

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

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

Returns all elements of the source collection that return false when evaluating of the predicate.

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

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

Similar to reject(Predicate), except with an evaluation parameter for the second generic argument in Predicate2.

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

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

Returns all elements of the source collection that return true when evaluating the predicate.

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

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

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

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

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

Similar to select(Predicate), except with an evaluation parameter for the second generic argument in Predicate2.

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

Redeclares org.eclipse.collections.api.set.sorted.SortedSetIterable.symmetricDifference, org.eclipse.collections.api.set.SetIterable.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 ImmutableSortedSet<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 ImmutableSortedSet<T>
takeWhile(Predicate<? super T> predicate)

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

Returns the initial elements that satisfy the Predicate.

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

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

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

public default ImmutableSortedSet<T>
toImmutableSortedSet()

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

Converts the RichIterable to the default ImmutableSortedSet implementation.

public ImmutableSortedSet<T>
toReversed()

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

Returns a new ReversibleIterable in reverse order.

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

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

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

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

Redeclares org.eclipse.collections.api.RichIterable.zip, org.eclipse.collections.api.ordered.SortedIterable.zip, org.eclipse.collections.api.ordered.ReversibleIterable.zip, org.eclipse.collections.api.collection.ImmutableCollection.zip.

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

public ImmutableSortedSet<Pair<T, Integer>>
Inherited from org.eclipse.collections.api.set.sorted.SortedSetIterable:
asParallelcomparatortoImmutable