Class SynchronizedShortBag
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedShortCollection
-
- org.eclipse.collections.impl.bag.mutable.primitive.SynchronizedShortBag
-
- All Implemented Interfaces:
Serializable,MutableShortBag,ShortBag,MutableShortCollection,PrimitiveIterable,ShortIterable
public class SynchronizedShortBag extends AbstractSynchronizedShortCollection implements MutableShortBag
A synchronized view of aMutableShortBag. It is imperative that the user manually synchronize on the collection when iterating over it using theShortIterator, as perCollections.synchronizedCollection(Collection).This file was automatically generated from template file synchronizedPrimitiveBag.stg.
- Since:
- 3.1.
- See Also:
MutableShortBag.asSynchronized(),MutableBag.asSynchronized(), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedShortBag(MutableShortBag bag)SynchronizedShortBag(MutableShortBag bag, Object newLock)
-
Method Summary
-
Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedShortCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, chunk, clear, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, injectInto, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, reduce, reduceIfEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, shortIterator, size, sum, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toString
-
Methods inherited from interface org.eclipse.collections.api.bag.primitive.MutableShortBag
selectDuplicates, tap
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableShortCollection
add, addAll, addAll, clear, remove, removeAll, removeAll, removeIf, retainAll, retainAll, shortIterator
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
Methods inherited from interface org.eclipse.collections.api.bag.primitive.ShortBag
toStringOfItemToCount
-
Methods inherited from interface org.eclipse.collections.api.ShortIterable
allSatisfy, anySatisfy, 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
-
-
-
-
Constructor Detail
-
SynchronizedShortBag
public SynchronizedShortBag(MutableShortBag bag)
-
SynchronizedShortBag
public SynchronizedShortBag(MutableShortBag bag, Object newLock)
-
-
Method Detail
-
with
public SynchronizedShortBag with(short element)
- Specified by:
within interfaceMutableShortBag- Specified by:
within interfaceMutableShortCollection- Overrides:
within classAbstractSynchronizedShortCollection
-
without
public SynchronizedShortBag without(short element)
- Specified by:
withoutin interfaceMutableShortBag- Specified by:
withoutin interfaceMutableShortCollection- Overrides:
withoutin classAbstractSynchronizedShortCollection
-
withAll
public SynchronizedShortBag withAll(ShortIterable elements)
- Specified by:
withAllin interfaceMutableShortBag- Specified by:
withAllin interfaceMutableShortCollection- Overrides:
withAllin classAbstractSynchronizedShortCollection
-
withoutAll
public SynchronizedShortBag withoutAll(ShortIterable elements)
- Specified by:
withoutAllin interfaceMutableShortBag- Specified by:
withoutAllin interfaceMutableShortCollection- Overrides:
withoutAllin classAbstractSynchronizedShortCollection
-
addOccurrences
public void addOccurrences(short item, int occurrences)- Specified by:
addOccurrencesin interfaceMutableShortBag
-
removeOccurrences
public boolean removeOccurrences(short item, int occurrences)- Specified by:
removeOccurrencesin interfaceMutableShortBag
-
sizeDistinct
public int sizeDistinct()
- Specified by:
sizeDistinctin interfaceShortBag
-
occurrencesOf
public int occurrencesOf(short item)
- Specified by:
occurrencesOfin interfaceShortBag
-
forEachWithOccurrences
public void forEachWithOccurrences(ShortIntProcedure procedure)
- Specified by:
forEachWithOccurrencesin interfaceShortBag
-
select
public MutableShortBag select(ShortPredicate predicate)
- Specified by:
selectin interfaceMutableShortBag- Specified by:
selectin interfaceMutableShortCollection- Specified by:
selectin interfaceShortBag- Specified by:
selectin interfaceShortIterable- Overrides:
selectin classAbstractSynchronizedShortCollection
-
selectByOccurrences
public MutableShortBag selectByOccurrences(IntPredicate predicate)
- Specified by:
selectByOccurrencesin interfaceMutableShortBag- Specified by:
selectByOccurrencesin interfaceShortBag
-
selectUnique
public MutableShortSet selectUnique()
- Specified by:
selectUniquein interfaceMutableShortBag- Specified by:
selectUniquein interfaceShortBag
-
topOccurrences
public MutableList<ShortIntPair> topOccurrences(int count)
- Specified by:
topOccurrencesin interfaceMutableShortBag- Specified by:
topOccurrencesin interfaceShortBag
-
bottomOccurrences
public MutableList<ShortIntPair> bottomOccurrences(int count)
- Specified by:
bottomOccurrencesin interfaceMutableShortBag- Specified by:
bottomOccurrencesin interfaceShortBag
-
reject
public MutableShortBag reject(ShortPredicate predicate)
- Specified by:
rejectin interfaceMutableShortBag- Specified by:
rejectin interfaceMutableShortCollection- Specified by:
rejectin interfaceShortBag- Specified by:
rejectin interfaceShortIterable- Overrides:
rejectin classAbstractSynchronizedShortCollection
-
collect
public <V> MutableBag<V> collect(ShortToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceMutableShortBag- Specified by:
collectin interfaceMutableShortCollection- Specified by:
collectin interfaceShortBag- Specified by:
collectin interfaceShortIterable- Overrides:
collectin classAbstractSynchronizedShortCollection
-
equals
public boolean equals(Object otherBag)
-
hashCode
public int hashCode()
-
asLazy
public LazyShortIterable asLazy()
- Specified by:
asLazyin interfaceShortIterable- Overrides:
asLazyin classAbstractSynchronizedShortCollection
-
asUnmodifiable
public MutableShortBag asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableShortBag- Specified by:
asUnmodifiablein interfaceMutableShortCollection- Overrides:
asUnmodifiablein classAbstractSynchronizedShortCollection
-
asSynchronized
public MutableShortBag asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableShortBag- Specified by:
asSynchronizedin interfaceMutableShortCollection- Overrides:
asSynchronizedin classAbstractSynchronizedShortCollection
-
toImmutable
public ImmutableShortBag toImmutable()
- Specified by:
toImmutablein interfaceMutableShortBag- Specified by:
toImmutablein interfaceMutableShortCollection- Specified by:
toImmutablein interfaceShortBag- Overrides:
toImmutablein classAbstractSynchronizedShortCollection
-
newEmpty
public MutableShortBag newEmpty()
- Specified by:
newEmptyin interfaceMutableShortBag- Specified by:
newEmptyin interfaceMutableShortCollection- Since:
- 9.2.
-
-