Top Description Fields Constructors Methods
org.eclipse.collections.impl.bag.mutable.primitive

public Class UnmodifiableShortBag

extends AbstractUnmodifiableShortCollection
implements MutableShortBag
Class Inheritance
All Implemented Interfaces
org.eclipse.collections.api.bag.primitive.MutableShortBag, org.eclipse.collections.api.bag.primitive.ShortBag, org.eclipse.collections.api.ShortIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.MutableShortCollection
Imports
org.eclipse.collections.api.ShortIterable, org.eclipse.collections.api.bag.MutableBag, org.eclipse.collections.api.bag.primitive.ImmutableShortBag, .MutableShortBag, org.eclipse.collections.api.block.function.primitive.ShortToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.IntPredicate, .ShortPredicate, org.eclipse.collections.api.block.procedure.primitive.ShortIntProcedure, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.tuple.primitive.ShortIntPair, org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableShortCollection, org.eclipse.collections.impl.factory.primitive.ShortBags, org.eclipse.collections.api.set.primitive.MutableShortSet

This file was automatically generated from template file unmodifiablePrimitiveBag.stg.
Since
3.1.

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public MutableShortBag
public MutableShortBag
public MutableList<ShortIntPair>
bottomOccurrences(int count)

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.bottomOccurrences.

Returns the count least frequently occurring items.

public <V> MutableBag<V>
public boolean
equals(Object otherBag)

Overrides java.lang.Object.equals.

Implements org.eclipse.collections.api.bag.primitive.ShortBag.equals.

Follows the same general contract as Bag#equals(Object).

public void
forEachWithOccurrences(ShortIntProcedure procedure)

Implements org.eclipse.collections.api.bag.primitive.ShortBag.forEachWithOccurrences.

For each distinct item, with the number of occurrences, execute the specified procedure.

private MutableShortBag
public int
public MutableShortBag
public int
occurrencesOf(short item)

Implements org.eclipse.collections.api.bag.primitive.ShortBag.occurrencesOf.

The occurrences of a distinct item in the bag.

public MutableShortBag
public boolean
public MutableShortBag
public MutableShortBag
selectByOccurrences(IntPredicate predicate)

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.selectByOccurrences.

Returns all elements of the bag that have a number of occurrences that satisfy the predicate.

public MutableShortSet
selectUnique()

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.selectUnique.

Returns all elements of the bag that have exactly one occurrence.

public int
sizeDistinct()

Implements org.eclipse.collections.api.bag.primitive.ShortBag.sizeDistinct.

The size of the Bag when counting only distinct elements.

public ImmutableShortBag
public MutableList<ShortIntPair>
topOccurrences(int count)

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.topOccurrences.

Returns the count most frequently occurring items.

public UnmodifiableShortBag
public UnmodifiableShortBag
public UnmodifiableShortBag
public UnmodifiableShortBag
Inherited from org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableShortCollection:
addaddAlladdAllallSatisfyanySatisfyappendStringappendStringappendStringasLazyaveragechunkclearcontainscontainsAllcontainsAllcontainsAnycontainsAnycontainsNonecontainsNonecountdetectIfNoneeachgetShortCollectioninjectIntoisEmptymakeStringmakeStringmakeStringmaxmaxIfEmptymedianminminIfEmptynoneSatisfynotEmptyreducereduceIfEmptyremoveremoveAllremoveAllremoveIfretainAllretainAllshortIteratorsizesumtoArraytoArraytoBagtoListtoSettoSortedArraytoSortedListtoString

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableShortCollection.serialVersionUID.

Constructor Detail

UnmodifiableShortBagback to summary
public UnmodifiableShortBag(MutableShortBag bag)

Method Detail

addOccurrencesback to summary
public void addOccurrences(short item, int occurrences)

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.addOccurrences.

Annotations
@Override
asSynchronizedback to summary
public MutableShortBag asSynchronized()

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableShortCollection.asSynchronized.

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.asSynchronized, org.eclipse.collections.api.collection.primitive.MutableShortCollection.asSynchronized.

Annotations
@Override
asUnmodifiableback to summary
public MutableShortBag asUnmodifiable()

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableShortCollection.asUnmodifiable.

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.asUnmodifiable, org.eclipse.collections.api.collection.primitive.MutableShortCollection.asUnmodifiable.

Annotations
@Override
bottomOccurrencesback to summary
public MutableList<ShortIntPair> bottomOccurrences(int count)

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.bottomOccurrences.

Doc from org.eclipse.collections.api.bag.primitive.MutableShortBag.bottomOccurrences.

Returns the count least frequently occurring items. In the event of a tie, all of the items with the number of occurrences that match the occurrences of the last item will be returned.

Annotations
@Override
collectback to summary
public <V> MutableBag<V> collect(ShortToObjectFunction<? extends V> function)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableShortCollection.collect.

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.collect, org.eclipse.collections.api.collection.primitive.MutableShortCollection.collect.

Doc from org.eclipse.collections.api.ShortIterable.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.

Annotations
@Override
equalsback to summary
public boolean equals(Object otherBag)

Overrides java.lang.Object.equals.

Implements org.eclipse.collections.api.bag.primitive.ShortBag.equals.

Doc from org.eclipse.collections.api.bag.primitive.ShortBag.equals.

Follows the same general contract as Bag#equals(Object).

Annotations
@Override
forEachWithOccurrencesback to summary
public void forEachWithOccurrences(ShortIntProcedure procedure)

Implements org.eclipse.collections.api.bag.primitive.ShortBag.forEachWithOccurrences.

Doc from org.eclipse.collections.api.bag.primitive.ShortBag.forEachWithOccurrences.

For each distinct item, with the number of occurrences, execute the specified procedure.

Annotations
@Override
getMutableShortBagback to summary
private MutableShortBag getMutableShortBag()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Implements org.eclipse.collections.api.bag.primitive.ShortBag.hashCode.

Doc from org.eclipse.collections.api.bag.primitive.ShortBag.hashCode.

Follows the same general contract as Bag#hashCode().

Annotations
@Override
newEmptyback to summary
public MutableShortBag newEmpty()

Overrides default org.eclipse.collections.api.bag.primitive.MutableShortBag.newEmpty, org.eclipse.collections.api.collection.primitive.MutableShortCollection.newEmpty.

Doc from org.eclipse.collections.api.bag.primitive.MutableShortBag.newEmpty.

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

Since
9.2.
occurrencesOfback to summary
public int occurrencesOf(short item)

Implements org.eclipse.collections.api.bag.primitive.ShortBag.occurrencesOf.

Doc from org.eclipse.collections.api.bag.primitive.ShortBag.occurrencesOf.

The occurrences of a distinct item in the bag.

Annotations
@Override
rejectback to summary
public MutableShortBag reject(ShortPredicate predicate)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableShortCollection.reject.

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.reject, org.eclipse.collections.api.collection.primitive.MutableShortCollection.reject.

Doc from org.eclipse.collections.api.ShortIterable.reject.

Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.

Annotations
@Override
removeOccurrencesback to summary
public boolean removeOccurrences(short item, int occurrences)

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.removeOccurrences.

Annotations
@Override
selectback to summary
public MutableShortBag select(ShortPredicate predicate)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableShortCollection.select.

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.select, org.eclipse.collections.api.collection.primitive.MutableShortCollection.select.

Doc from org.eclipse.collections.api.ShortIterable.select.

Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.

Annotations
@Override
selectByOccurrencesback to summary
public MutableShortBag selectByOccurrences(IntPredicate predicate)

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.selectByOccurrences.

Doc from org.eclipse.collections.api.bag.primitive.MutableShortBag.selectByOccurrences.

Returns all elements of the bag that have a number of occurrences that satisfy the predicate.

Annotations
@Override
selectUniqueback to summary
public MutableShortSet selectUnique()

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.selectUnique.

Doc from org.eclipse.collections.api.bag.primitive.MutableShortBag.selectUnique.

Returns all elements of the bag that have exactly one occurrence.

Annotations
@Override
sizeDistinctback to summary
public int sizeDistinct()

Implements org.eclipse.collections.api.bag.primitive.ShortBag.sizeDistinct.

Doc from org.eclipse.collections.api.bag.primitive.ShortBag.sizeDistinct.

The size of the Bag when counting only distinct elements.

Annotations
@Override
toImmutableback to summary
public ImmutableShortBag toImmutable()

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableShortCollection.toImmutable.

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.toImmutable, org.eclipse.collections.api.collection.primitive.MutableShortCollection.toImmutable.

Doc from org.eclipse.collections.api.bag.primitive.MutableShortBag.toImmutable.

Returns an immutable copy of this bag.

Annotations
@Override
topOccurrencesback to summary
public MutableList<ShortIntPair> topOccurrences(int count)

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.topOccurrences.

Doc from org.eclipse.collections.api.bag.primitive.MutableShortBag.topOccurrences.

Returns the count most frequently occurring items. In the event of a tie, all of the items with the number of occurrences that match the occurrences of the last item will be returned.

Annotations
@Override
withback to summary
public UnmodifiableShortBag with(short element)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableShortCollection.with.

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.with, org.eclipse.collections.api.collection.primitive.MutableShortCollection.with.

Annotations
@Override
withAllback to summary
public UnmodifiableShortBag withAll(ShortIterable elements)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableShortCollection.withAll.

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.withAll, org.eclipse.collections.api.collection.primitive.MutableShortCollection.withAll.

Annotations
@Override
withoutback to summary
public UnmodifiableShortBag without(short element)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableShortCollection.without.

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.without, org.eclipse.collections.api.collection.primitive.MutableShortCollection.without.

Annotations
@Override
withoutAllback to summary
public UnmodifiableShortBag withoutAll(ShortIterable elements)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableShortCollection.withoutAll.

Implements org.eclipse.collections.api.bag.primitive.MutableShortBag.withoutAll, org.eclipse.collections.api.collection.primitive.MutableShortCollection.withoutAll.

Annotations
@Override