Class UnmodifiableIntBag
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableIntCollection
-
- org.eclipse.collections.impl.bag.mutable.primitive.UnmodifiableIntBag
-
- All Implemented Interfaces:
Serializable,IntBag,MutableIntBag,MutableIntCollection,IntIterable,PrimitiveIterable
public class UnmodifiableIntBag extends AbstractUnmodifiableIntCollection implements MutableIntBag
This file was automatically generated from template file unmodifiablePrimitiveBag.stg.- Since:
- 3.1.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UnmodifiableIntBag(MutableIntBag bag)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOccurrences(int item, int occurrences)MutableIntBagasSynchronized()MutableIntBagasUnmodifiable()MutableList<IntIntPair>bottomOccurrences(int count)<V> MutableBag<V>collect(IntToObjectFunction<? extends V> function)booleanequals(Object otherBag)voidforEachWithOccurrences(IntIntProcedure procedure)inthashCode()MutableIntBagnewEmpty()intoccurrencesOf(int item)MutableIntBagreject(IntPredicate predicate)booleanremoveOccurrences(int item, int occurrences)MutableIntBagselect(IntPredicate predicate)MutableIntBagselectByOccurrences(IntPredicate predicate)MutableIntSetselectUnique()intsizeDistinct()ImmutableIntBagtoImmutable()MutableList<IntIntPair>topOccurrences(int count)UnmodifiableIntBagwith(int element)UnmodifiableIntBagwithAll(IntIterable elements)UnmodifiableIntBagwithout(int element)UnmodifiableIntBagwithoutAll(IntIterable elements)-
Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableIntCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, chunk, clear, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, injectInto, intIterator, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, reduce, reduceIfEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, size, sum, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toString
-
Methods inherited from interface org.eclipse.collections.api.bag.primitive.IntBag
toStringOfItemToCount
-
Methods inherited from interface org.eclipse.collections.api.IntIterable
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.bag.primitive.MutableIntBag
selectDuplicates, tap
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableIntCollection
add, addAll, addAll, clear, intIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAll
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
-
-
-
Constructor Detail
-
UnmodifiableIntBag
public UnmodifiableIntBag(MutableIntBag bag)
-
-
Method Detail
-
with
public UnmodifiableIntBag with(int element)
- Specified by:
within interfaceMutableIntBag- Specified by:
within interfaceMutableIntCollection- Overrides:
within classAbstractUnmodifiableIntCollection
-
without
public UnmodifiableIntBag without(int element)
- Specified by:
withoutin interfaceMutableIntBag- Specified by:
withoutin interfaceMutableIntCollection- Overrides:
withoutin classAbstractUnmodifiableIntCollection
-
withAll
public UnmodifiableIntBag withAll(IntIterable elements)
- Specified by:
withAllin interfaceMutableIntBag- Specified by:
withAllin interfaceMutableIntCollection- Overrides:
withAllin classAbstractUnmodifiableIntCollection
-
withoutAll
public UnmodifiableIntBag withoutAll(IntIterable elements)
- Specified by:
withoutAllin interfaceMutableIntBag- Specified by:
withoutAllin interfaceMutableIntCollection- Overrides:
withoutAllin classAbstractUnmodifiableIntCollection
-
addOccurrences
public void addOccurrences(int item, int occurrences)- Specified by:
addOccurrencesin interfaceMutableIntBag
-
removeOccurrences
public boolean removeOccurrences(int item, int occurrences)- Specified by:
removeOccurrencesin interfaceMutableIntBag
-
sizeDistinct
public int sizeDistinct()
- Specified by:
sizeDistinctin interfaceIntBag
-
occurrencesOf
public int occurrencesOf(int item)
- Specified by:
occurrencesOfin interfaceIntBag
-
forEachWithOccurrences
public void forEachWithOccurrences(IntIntProcedure procedure)
- Specified by:
forEachWithOccurrencesin interfaceIntBag
-
selectByOccurrences
public MutableIntBag selectByOccurrences(IntPredicate predicate)
- Specified by:
selectByOccurrencesin interfaceIntBag- Specified by:
selectByOccurrencesin interfaceMutableIntBag
-
selectUnique
public MutableIntSet selectUnique()
- Specified by:
selectUniquein interfaceIntBag- Specified by:
selectUniquein interfaceMutableIntBag
-
topOccurrences
public MutableList<IntIntPair> topOccurrences(int count)
- Specified by:
topOccurrencesin interfaceIntBag- Specified by:
topOccurrencesin interfaceMutableIntBag
-
bottomOccurrences
public MutableList<IntIntPair> bottomOccurrences(int count)
- Specified by:
bottomOccurrencesin interfaceIntBag- Specified by:
bottomOccurrencesin interfaceMutableIntBag
-
select
public MutableIntBag select(IntPredicate predicate)
- Specified by:
selectin interfaceIntBag- Specified by:
selectin interfaceIntIterable- Specified by:
selectin interfaceMutableIntBag- Specified by:
selectin interfaceMutableIntCollection- Overrides:
selectin classAbstractUnmodifiableIntCollection
-
reject
public MutableIntBag reject(IntPredicate predicate)
- Specified by:
rejectin interfaceIntBag- Specified by:
rejectin interfaceIntIterable- Specified by:
rejectin interfaceMutableIntBag- Specified by:
rejectin interfaceMutableIntCollection- Overrides:
rejectin classAbstractUnmodifiableIntCollection
-
collect
public <V> MutableBag<V> collect(IntToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceIntBag- Specified by:
collectin interfaceIntIterable- Specified by:
collectin interfaceMutableIntBag- Specified by:
collectin interfaceMutableIntCollection- Overrides:
collectin classAbstractUnmodifiableIntCollection
-
equals
public boolean equals(Object otherBag)
-
hashCode
public int hashCode()
-
asUnmodifiable
public MutableIntBag asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableIntBag- Specified by:
asUnmodifiablein interfaceMutableIntCollection- Overrides:
asUnmodifiablein classAbstractUnmodifiableIntCollection
-
asSynchronized
public MutableIntBag asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableIntBag- Specified by:
asSynchronizedin interfaceMutableIntCollection- Overrides:
asSynchronizedin classAbstractUnmodifiableIntCollection
-
toImmutable
public ImmutableIntBag toImmutable()
- Specified by:
toImmutablein interfaceIntBag- Specified by:
toImmutablein interfaceMutableIntBag- Specified by:
toImmutablein interfaceMutableIntCollection- Overrides:
toImmutablein classAbstractUnmodifiableIntCollection
-
newEmpty
public MutableIntBag newEmpty()
- Specified by:
newEmptyin interfaceMutableIntBag- Specified by:
newEmptyin interfaceMutableIntCollection- Since:
- 9.2.
-
-