Top Constructors Methods
org.eclipse.collections.impl.bag.sorted.immutable

pack-priv abstract Class AbstractImmutableSortedBag<T>

extends AbstractImmutableBagIterable<T>
implements ImmutableSortedBag<T>
Class Inheritance
All Implemented Interfaces
org.eclipse.collections.api.bag.sorted.ImmutableSortedBag, org.eclipse.collections.api.bag.sorted.SortedBag, org.eclipse.collections.api.ordered.ReversibleIterable, org.eclipse.collections.api.ordered.OrderedIterable, org.eclipse.collections.api.RichIterable, org.eclipse.collections.api.InternalIterable, java.lang.Iterable, org.eclipse.collections.api.ordered.SortedIterable, java.lang.Comparable, org.eclipse.collections.api.bag.Bag, org.eclipse.collections.api.bag.ImmutableBagIterable, org.eclipse.collections.api.collection.ImmutableCollection
Known Direct Subclasses
org.eclipse.collections.impl.bag.sorted.immutable.ImmutableEmptySortedBag, org.eclipse.collections.impl.bag.sorted.immutable.ImmutableSortedBagImpl
Imports
java.util.Collection, .Comparator, .Iterator, org.eclipse.collections.api.RichIterable, org.eclipse.collections.api.bag.ImmutableBag, .MutableBag, org.eclipse.collections.api.bag.sorted.ImmutableSortedBag, .MutableSortedBag, 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.IntPredicate, org.eclipse.collections.api.block.procedure.Procedure, org.eclipse.collections.api.collection.MutableCollection, org.eclipse.collections.api.factory.Bags, .Lists, .SortedBags, org.eclipse.collections.api.factory.primitive.BooleanLists, .ByteLists, .CharLists, .DoubleLists, .FloatLists, .IntLists, .LongLists, .ShortLists, org.eclipse.collections.api.list.ImmutableList, .MutableList, org.eclipse.collections.api.list.primitive.ImmutableBooleanList, .ImmutableByteList, .ImmutableCharList, .ImmutableDoubleList, .ImmutableFloatList, .ImmutableIntList, .ImmutableLongList, .ImmutableShortList, org.eclipse.collections.api.map.ImmutableMap, org.eclipse.collections.api.multimap.sortedbag.ImmutableSortedBagMultimap, org.eclipse.collections.api.partition.bag.sorted.PartitionImmutableSortedBag, .PartitionMutableSortedBag, org.eclipse.collections.api.set.sorted.ImmutableSortedSet, .MutableSortedSet, org.eclipse.collections.api.tuple.Pair, org.eclipse.collections.api.tuple.primitive.ObjectIntPair, org.eclipse.collections.impl.bag.immutable.AbstractImmutableBagIterable, org.eclipse.collections.impl.block.factory.Comparators, .Functions, .Predicates, org.eclipse.collections.impl.list.mutable.FastList, org.eclipse.collections.impl.map.mutable.UnifiedMap, org.eclipse.collections.impl.multimap.bag.sorted.mutable.TreeBagMultimap, org.eclipse.collections.impl.partition.bag.sorted.PartitionTreeBag, org.eclipse.collections.impl.set.sorted.mutable.TreeSortedSet, org.eclipse.collections.impl.tuple.Tuples, org.eclipse.collections.impl.utility.Iterate

Since
7.0

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ImmutableList<ObjectIntPair<T>>
bottomOccurrences(int n)

Implements org.eclipse.collections.api.bag.Bag.bottomOccurrences.

Returns the count least frequently occurring items.

public RichIterable<RichIterable<T>>
chunk(int size)

Implements org.eclipse.collections.api.RichIterable.chunk.

Partitions elements in fixed size chunks.

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

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

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

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

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

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

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

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

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

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

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

Implements org.eclipse.collections.api.bag.sorted.ImmutableSortedBag.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 <V> ImmutableList<V>
public <V> ImmutableBag<V>
countBy(Function<? super T, ? extends V> function)

Overrides org.eclipse.collections.impl.bag.immutable.AbstractImmutableBagIterable.countBy.

Overrides default org.eclipse.collections.api.bag.sorted.ImmutableSortedBag.countBy, org.eclipse.collections.api.RichIterable.countBy, org.eclipse.collections.api.collection.ImmutableCollection.countBy.

This method will count the number of occurrences of each value calculated by applying the function to each element of the collection.

public <V> ImmutableBag<V>
countByEach(Function<? super T, ? extends Iterable<V>> function)

Overrides org.eclipse.collections.impl.bag.immutable.AbstractImmutableBagIterable.countByEach.

Overrides default org.eclipse.collections.api.bag.sorted.ImmutableSortedBag.countByEach, org.eclipse.collections.api.RichIterable.countByEach, org.eclipse.collections.api.collection.ImmutableCollection.countByEach.

This method will count the number of occurrences of each value calculated by applying the function to each element of the collection.

public <V, P> ImmutableBag<V>
countByWith(Function2<? super T, ? super P, ? extends V> function, P parameter)

Overrides org.eclipse.collections.impl.bag.immutable.AbstractImmutableBagIterable.countByWith.

Overrides default org.eclipse.collections.api.bag.sorted.ImmutableSortedBag.countByWith, org.eclipse.collections.api.RichIterable.countByWith, org.eclipse.collections.api.collection.ImmutableCollection.countByWith.

This method will count the number of occurrences of each value calculated by applying the function to each element of the collection with the specified parameter as the second argument.

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 <V> ImmutableList<V>
public <V> ImmutableSortedBagMultimap<V, T>
groupBy(Function<? super T, ? extends V> function)

Implements org.eclipse.collections.api.bag.sorted.ImmutableSortedBag.groupBy, org.eclipse.collections.api.bag.ImmutableBagIterable.groupBy, org.eclipse.collections.api.bag.Bag.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> ImmutableSortedBagMultimap<V, T>
public <V> ImmutableMap<V, T>
groupByUniqueKey(Function<? super T, ? extends V> function)

Overrides default org.eclipse.collections.api.collection.ImmutableCollection.groupByUniqueKey.

Implements org.eclipse.collections.api.RichIterable.groupByUniqueKey.

For each element of the iterable, the function is evaluated, and the results of these evaluations are collected into a new map, where the transformed value is the key.

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

Implements org.eclipse.collections.api.bag.sorted.ImmutableSortedBag.newWithoutAll, 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.

private MutableList<ObjectIntPair<T>>
public PartitionImmutableSortedBag<T>
public <P> PartitionImmutableSortedBag<T>
public ImmutableSortedBag<T>
public <P> ImmutableSortedBag<T>
public ImmutableSortedBag<T>
public ImmutableSortedBag<T>
public <S> ImmutableSortedBag<S>
public <P> ImmutableSortedBag<T>
public ImmutableSortedBag<T>
public ImmutableSortedBag<T>
public ImmutableList<ObjectIntPair<T>>
topOccurrences(int n)

Implements org.eclipse.collections.api.bag.Bag.topOccurrences.

Returns the count most frequently occurring items.

public ImmutableSortedBag<T>
toReversed()

Implements org.eclipse.collections.api.bag.sorted.ImmutableSortedBag.toReversed.

Returns a new ReversibleIterable in reverse order.

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

Implements org.eclipse.collections.api.bag.sorted.ImmutableSortedBag.zip, org.eclipse.collections.api.RichIterable.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 <S, R extends Collection<Pair<T, S>>> R
public ImmutableSortedSet<Pair<T, Integer>>
Inherited from org.eclipse.collections.impl.bag.immutable.AbstractImmutableBagIterable:
addaddAllcastToCollectionclearparallelStreamremoveremoveAllremoveAllFromretainAllshortCircuitspliteratorstreamsumByDoublesumByFloatsumByIntsumByLong