Class SynchronizedShortIntMap
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.SynchronizedShortIntMap
-
- All Implemented Interfaces:
Serializable,IntIterable,IntValuesMap,MutableIntValuesMap,MutableShortIntMap,ShortIntMap,PrimitiveIterable
public class SynchronizedShortIntMap extends Object implements MutableShortIntMap, Serializable
A synchronized view of aMutableShortIntMap. It is imperative that the user manually synchronize on the collection when iterating over it using theMutableIntIteratoras perCollections.synchronizedCollection(Collection).This file was automatically generated from template file synchronizedPrimitivePrimitiveMap.stg.
- Since:
- 3.1.
- See Also:
MutableShortIntMap.asSynchronized(),MutableMap.asSynchronized(), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedShortIntMap(MutableShortIntMap map)SynchronizedShortIntMap(MutableShortIntMap map, Object newLock)
-
Method Summary
-
Methods inherited from interface org.eclipse.collections.api.IntIterable
averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, medianIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.IntValuesMap
tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableShortIntMap
withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ShortIntMap
injectIntoKeyValue
-
-
-
-
Constructor Detail
-
SynchronizedShortIntMap
public SynchronizedShortIntMap(MutableShortIntMap map)
-
SynchronizedShortIntMap
public SynchronizedShortIntMap(MutableShortIntMap map, Object newLock)
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clearin interfaceMutableIntValuesMap
-
put
public void put(short key, int value)- Specified by:
putin interfaceMutableShortIntMap
-
putPair
public void putPair(ShortIntPair keyValuePair)
- Specified by:
putPairin interfaceMutableShortIntMap
-
putAll
public void putAll(ShortIntMap map)
- Specified by:
putAllin interfaceMutableShortIntMap
-
updateValues
public void updateValues(ShortIntToIntFunction function)
- Specified by:
updateValuesin interfaceMutableShortIntMap
-
removeKey
public void removeKey(short key)
- Specified by:
removeKeyin interfaceMutableShortIntMap
-
remove
public void remove(short key)
- Specified by:
removein interfaceMutableShortIntMap
-
removeKeyIfAbsent
public int removeKeyIfAbsent(short key, int value)- Specified by:
removeKeyIfAbsentin interfaceMutableShortIntMap
-
getIfAbsentPut
public int getIfAbsentPut(short key, int value)- Specified by:
getIfAbsentPutin interfaceMutableShortIntMap
-
getAndPut
public int getAndPut(short key, int putValue, int defaultValue)- Specified by:
getAndPutin interfaceMutableShortIntMap
-
getIfAbsentPut
public int getIfAbsentPut(short key, IntFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableShortIntMap
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(short key, ShortToIntFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableShortIntMap
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(short key, IntFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableShortIntMap
-
updateValue
public int updateValue(short key, int initialValueIfAbsent, IntToIntFunction function)- Specified by:
updateValuein interfaceMutableShortIntMap
-
get
public int get(short key)
- Specified by:
getin interfaceShortIntMap
-
getIfAbsent
public int getIfAbsent(short key, int ifAbsent)- Specified by:
getIfAbsentin interfaceShortIntMap
-
getOrThrow
public int getOrThrow(short key)
- Specified by:
getOrThrowin interfaceShortIntMap
-
containsKey
public boolean containsKey(short key)
- Specified by:
containsKeyin interfaceShortIntMap
-
containsValue
public boolean containsValue(int value)
- Specified by:
containsValuein interfaceIntValuesMap
-
forEachValue
public void forEachValue(IntProcedure procedure)
- Specified by:
forEachValuein interfaceIntValuesMap
-
forEachKey
public void forEachKey(ShortProcedure procedure)
- Specified by:
forEachKeyin interfaceShortIntMap
-
forEachKeyValue
public void forEachKeyValue(ShortIntProcedure procedure)
- Specified by:
forEachKeyValuein interfaceShortIntMap
-
keysView
public LazyShortIterable keysView()
- Specified by:
keysViewin interfaceShortIntMap
-
keyValuesView
public RichIterable<ShortIntPair> keyValuesView()
- Specified by:
keyValuesViewin interfaceShortIntMap
-
flipUniqueValues
public MutableIntShortMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceMutableShortIntMap- Specified by:
flipUniqueValuesin interfaceShortIntMap
-
select
public MutableShortIntMap select(ShortIntPredicate predicate)
- Specified by:
selectin interfaceMutableShortIntMap- Specified by:
selectin interfaceShortIntMap
-
reject
public MutableShortIntMap reject(ShortIntPredicate predicate)
- Specified by:
rejectin interfaceMutableShortIntMap- Specified by:
rejectin interfaceShortIntMap
-
intIterator
public MutableIntIterator intIterator()
This must be manually synchronized by the developer.- Specified by:
intIteratorin interfaceIntIterable- Specified by:
intIteratorin interfaceMutableIntValuesMap
-
each
public void each(IntProcedure procedure)
- Specified by:
eachin interfaceIntIterable- Since:
- 7.0.
-
count
public int count(IntPredicate predicate)
- Specified by:
countin interfaceIntIterable
-
anySatisfy
public boolean anySatisfy(IntPredicate predicate)
- Specified by:
anySatisfyin interfaceIntIterable
-
allSatisfy
public boolean allSatisfy(IntPredicate predicate)
- Specified by:
allSatisfyin interfaceIntIterable
-
noneSatisfy
public boolean noneSatisfy(IntPredicate predicate)
- Specified by:
noneSatisfyin interfaceIntIterable
-
select
public MutableIntBag select(IntPredicate predicate)
- Specified by:
selectin interfaceIntIterable- Specified by:
selectin interfaceIntValuesMap- Specified by:
selectin interfaceMutableIntValuesMap
-
reject
public MutableIntBag reject(IntPredicate predicate)
- Specified by:
rejectin interfaceIntIterable- Specified by:
rejectin interfaceIntValuesMap- Specified by:
rejectin interfaceMutableIntValuesMap
-
collect
public <V> MutableBag<V> collect(IntToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceIntIterable- Specified by:
collectin interfaceIntValuesMap- Specified by:
collectin interfaceMutableIntValuesMap
-
detectIfNone
public int detectIfNone(IntPredicate predicate, int ifNone)
- Specified by:
detectIfNonein interfaceIntIterable
-
sum
public long sum()
- Specified by:
sumin interfaceIntIterable
-
max
public int max()
- Specified by:
maxin interfaceIntIterable
-
maxIfEmpty
public int maxIfEmpty(int defaultValue)
- Specified by:
maxIfEmptyin interfaceIntIterable
-
min
public int min()
- Specified by:
minin interfaceIntIterable
-
minIfEmpty
public int minIfEmpty(int defaultValue)
- Specified by:
minIfEmptyin interfaceIntIterable
-
average
public double average()
- Specified by:
averagein interfaceIntIterable
-
median
public double median()
- Specified by:
medianin interfaceIntIterable
-
addToValue
public int addToValue(short key, int toBeAdded)- Specified by:
addToValuein interfaceMutableShortIntMap
-
toSortedArray
public int[] toSortedArray()
- Specified by:
toSortedArrayin interfaceIntIterable
-
toSortedList
public MutableIntList toSortedList()
- Specified by:
toSortedListin interfaceIntIterable
-
toArray
public int[] toArray()
- Specified by:
toArrayin interfaceIntIterable
-
toArray
public int[] toArray(int[] target)
- Specified by:
toArrayin interfaceIntIterable
-
contains
public boolean contains(int value)
- Specified by:
containsin interfaceIntIterable
-
containsAll
public boolean containsAll(int... source)
- Specified by:
containsAllin interfaceIntIterable
-
containsAll
public boolean containsAll(IntIterable source)
- Specified by:
containsAllin interfaceIntIterable
-
toList
public MutableIntList toList()
- Specified by:
toListin interfaceIntIterable
-
toSet
public MutableIntSet toSet()
- Specified by:
toSetin interfaceIntIterable
-
toBag
public MutableIntBag toBag()
- Specified by:
toBagin interfaceIntIterable
-
asLazy
public LazyIntIterable asLazy()
- Specified by:
asLazyin interfaceIntIterable
-
withKeyValue
public MutableShortIntMap withKeyValue(short key, int value)
- Specified by:
withKeyValuein interfaceMutableShortIntMap
-
withoutKey
public MutableShortIntMap withoutKey(short key)
- Specified by:
withoutKeyin interfaceMutableShortIntMap
-
withoutAllKeys
public MutableShortIntMap withoutAllKeys(ShortIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableShortIntMap
-
asUnmodifiable
public MutableShortIntMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableShortIntMap
-
asSynchronized
public MutableShortIntMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableShortIntMap
-
toImmutable
public ImmutableShortIntMap toImmutable()
- Specified by:
toImmutablein interfaceShortIntMap
-
size
public int size()
- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
- Specified by:
notEmptyin interfacePrimitiveIterable
-
keySet
public MutableShortSet keySet()
- Specified by:
keySetin interfaceShortIntMap
-
values
public MutableIntCollection values()
- Specified by:
valuesin interfaceIntValuesMap
-
equals
public boolean equals(Object otherMap)
- Specified by:
equalsin interfaceShortIntMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceShortIntMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfacePrimitiveIterable- Specified by:
toStringin interfaceShortIntMap- Overrides:
toStringin classObject
-
makeString
public String makeString()
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String separator)
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendStringin interfacePrimitiveIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectIntToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin interfaceIntIterable
-
chunk
public RichIterable<IntIterable> chunk(int size)
- Specified by:
chunkin interfaceIntIterable
-
-