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

public Class UnmodifiableLongBag

extends AbstractUnmodifiableLongCollection
implements MutableLongBag
Class Inheritance
All Implemented Interfaces
org.eclipse.collections.api.bag.primitive.MutableLongBag, org.eclipse.collections.api.bag.primitive.LongBag, org.eclipse.collections.api.LongIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.MutableLongCollection
Imports
org.eclipse.collections.api.LongIterable, org.eclipse.collections.api.bag.MutableBag, org.eclipse.collections.api.bag.primitive.ImmutableLongBag, .MutableLongBag, org.eclipse.collections.api.block.function.primitive.LongToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.IntPredicate, .LongPredicate, org.eclipse.collections.api.block.procedure.primitive.LongIntProcedure, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.tuple.primitive.LongIntPair, org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableLongCollection, org.eclipse.collections.impl.factory.primitive.LongBags, org.eclipse.collections.api.set.primitive.MutableLongSet

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 MutableLongBag
public MutableLongBag
public MutableList<LongIntPair>
bottomOccurrences(int count)

Implements org.eclipse.collections.api.bag.primitive.MutableLongBag.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.LongBag.equals.

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

public void
forEachWithOccurrences(LongIntProcedure procedure)

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

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

private MutableLongBag
public int
public MutableLongBag
public int
occurrencesOf(long item)

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

The occurrences of a distinct item in the bag.

public MutableLongBag
public boolean
public MutableLongBag
public MutableLongBag
selectByOccurrences(IntPredicate predicate)

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

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

public MutableLongSet
selectUnique()

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

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

public int
sizeDistinct()

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

The size of the Bag when counting only distinct elements.

public ImmutableLongBag
public MutableList<LongIntPair>
topOccurrences(int count)

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

Returns the count most frequently occurring items.

public UnmodifiableLongBag
public UnmodifiableLongBag
public UnmodifiableLongBag
public UnmodifiableLongBag
Inherited from org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableLongCollection:
addaddAlladdAllallSatisfyanySatisfyappendStringappendStringappendStringasLazyaveragechunkclearcontainscontainsAllcontainsAllcontainsAnycontainsAnycontainsNonecontainsNonecountdetectIfNoneeachgetLongCollectioninjectIntoisEmptylongIteratormakeStringmakeStringmakeStringmaxmaxIfEmptymedianminminIfEmptynoneSatisfynotEmptyreducereduceIfEmptyremoveremoveAllremoveAllremoveIfretainAllretainAllsizesumtoArraytoArraytoBagtoListtoSettoSortedArraytoSortedListtoString

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

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

Constructor Detail

UnmodifiableLongBagback to summary
public UnmodifiableLongBag(MutableLongBag bag)

Method Detail

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

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

Annotations
@Override
asSynchronizedback to summary
public MutableLongBag asSynchronized()

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

Implements org.eclipse.collections.api.bag.primitive.MutableLongBag.asSynchronized, org.eclipse.collections.api.collection.primitive.MutableLongCollection.asSynchronized.

Annotations
@Override
asUnmodifiableback to summary
public MutableLongBag asUnmodifiable()

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

Implements org.eclipse.collections.api.bag.primitive.MutableLongBag.asUnmodifiable, org.eclipse.collections.api.collection.primitive.MutableLongCollection.asUnmodifiable.

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

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

Doc from org.eclipse.collections.api.bag.primitive.MutableLongBag.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(LongToObjectFunction<? extends V> function)

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

Implements org.eclipse.collections.api.bag.primitive.MutableLongBag.collect, org.eclipse.collections.api.collection.primitive.MutableLongCollection.collect.

Doc from org.eclipse.collections.api.LongIterable.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.LongBag.equals.

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

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

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

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

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

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

Annotations
@Override
getMutableLongBagback to summary
private MutableLongBag getMutableLongBag()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

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

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

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

Annotations
@Override
newEmptyback to summary
public MutableLongBag newEmpty()

Overrides default org.eclipse.collections.api.bag.primitive.MutableLongBag.newEmpty, org.eclipse.collections.api.collection.primitive.MutableLongCollection.newEmpty.

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

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

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

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

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

The occurrences of a distinct item in the bag.

Annotations
@Override
rejectback to summary
public MutableLongBag reject(LongPredicate predicate)

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

Implements org.eclipse.collections.api.bag.primitive.MutableLongBag.reject, org.eclipse.collections.api.collection.primitive.MutableLongCollection.reject.

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

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

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

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

Annotations
@Override
selectback to summary
public MutableLongBag select(LongPredicate predicate)

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

Implements org.eclipse.collections.api.bag.primitive.MutableLongBag.select, org.eclipse.collections.api.collection.primitive.MutableLongCollection.select.

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

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

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

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

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

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

Annotations
@Override
selectUniqueback to summary
public MutableLongSet selectUnique()

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

Doc from org.eclipse.collections.api.bag.primitive.MutableLongBag.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.LongBag.sizeDistinct.

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

The size of the Bag when counting only distinct elements.

Annotations
@Override
toImmutableback to summary
public ImmutableLongBag toImmutable()

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

Implements org.eclipse.collections.api.bag.primitive.MutableLongBag.toImmutable, org.eclipse.collections.api.collection.primitive.MutableLongCollection.toImmutable.

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

Returns an immutable copy of this bag.

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

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

Doc from org.eclipse.collections.api.bag.primitive.MutableLongBag.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 UnmodifiableLongBag with(long element)

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

Implements org.eclipse.collections.api.bag.primitive.MutableLongBag.with, org.eclipse.collections.api.collection.primitive.MutableLongCollection.with.

Annotations
@Override
withAllback to summary
public UnmodifiableLongBag withAll(LongIterable elements)

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

Implements org.eclipse.collections.api.bag.primitive.MutableLongBag.withAll, org.eclipse.collections.api.collection.primitive.MutableLongCollection.withAll.

Annotations
@Override
withoutback to summary
public UnmodifiableLongBag without(long element)

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

Implements org.eclipse.collections.api.bag.primitive.MutableLongBag.without, org.eclipse.collections.api.collection.primitive.MutableLongCollection.without.

Annotations
@Override
withoutAllback to summary
public UnmodifiableLongBag withoutAll(LongIterable elements)

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

Implements org.eclipse.collections.api.bag.primitive.MutableLongBag.withoutAll, org.eclipse.collections.api.collection.primitive.MutableLongCollection.withoutAll.

Annotations
@Override