Class SynchronizedObjectShortMap<K>
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.SynchronizedObjectShortMap<K>
-
- All Implemented Interfaces:
Serializable,MutableObjectShortMap<K>,ObjectShortMap<K>,PrimitiveIterable,ShortIterable
public class SynchronizedObjectShortMap<K> extends Object implements MutableObjectShortMap<K>, Serializable
A synchronized view of aMutableObjectShortMap. It is imperative that the user manually synchronize on the collection when iterating over it using the ShortIterator as perCollections.synchronizedCollection(Collection).This file was automatically generated from template file synchronizedObjectPrimitiveMap.stg.
- Since:
- 3.1.
- See Also:
MutableObjectShortMap.asSynchronized(),MutableMap.asSynchronized(), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedObjectShortMap(MutableObjectShortMap<K> map)SynchronizedObjectShortMap(MutableObjectShortMap<K> map, Object newLock)
-
Method Summary
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableObjectShortMap
tap, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ObjectShortMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.api.ShortIterable
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
-
-
-
-
Constructor Detail
-
SynchronizedObjectShortMap
public SynchronizedObjectShortMap(MutableObjectShortMap<K> map)
-
SynchronizedObjectShortMap
public SynchronizedObjectShortMap(MutableObjectShortMap<K> map, Object newLock)
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clearin interfaceMutableObjectShortMap<K>
-
put
public void put(K key, short value)
- Specified by:
putin interfaceMutableObjectShortMap<K>
-
putPair
public void putPair(ObjectShortPair<K> keyValuePair)
- Specified by:
putPairin interfaceMutableObjectShortMap<K>
-
putAll
public void putAll(ObjectShortMap<? extends K> map)
- Specified by:
putAllin interfaceMutableObjectShortMap<K>
-
updateValues
public void updateValues(ObjectShortToShortFunction<? super K> function)
- Specified by:
updateValuesin interfaceMutableObjectShortMap<K>
-
removeKey
public void removeKey(K key)
- Specified by:
removeKeyin interfaceMutableObjectShortMap<K>
-
remove
public void remove(Object key)
- Specified by:
removein interfaceMutableObjectShortMap<K>
-
removeKeyIfAbsent
public short removeKeyIfAbsent(K key, short value)
- Specified by:
removeKeyIfAbsentin interfaceMutableObjectShortMap<K>
-
getIfAbsentPut
public short getIfAbsentPut(K key, short value)
- Specified by:
getIfAbsentPutin interfaceMutableObjectShortMap<K>
-
getAndPut
public short getAndPut(K key, short putValue, short defaultValue)
- Specified by:
getAndPutin interfaceMutableObjectShortMap<K>
-
getIfAbsentPut
public short getIfAbsentPut(K key, ShortFunction0 function)
- Specified by:
getIfAbsentPutin interfaceMutableObjectShortMap<K>
-
getIfAbsentPutWithKey
public short getIfAbsentPutWithKey(K key, ShortFunction<? super K> function)
- Specified by:
getIfAbsentPutWithKeyin interfaceMutableObjectShortMap<K>
-
getIfAbsentPutWith
public <P> short getIfAbsentPutWith(K key, ShortFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWithin interfaceMutableObjectShortMap<K>
-
updateValue
public short updateValue(K key, short initialValueIfAbsent, ShortToShortFunction function)
- Specified by:
updateValuein interfaceMutableObjectShortMap<K>
-
get
public short get(Object key)
- Specified by:
getin interfaceObjectShortMap<K>
-
getOrThrow
public short getOrThrow(Object key)
- Specified by:
getOrThrowin interfaceObjectShortMap<K>
-
getIfAbsent
public short getIfAbsent(Object key, short ifAbsent)
- Specified by:
getIfAbsentin interfaceObjectShortMap<K>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceObjectShortMap<K>
-
containsValue
public boolean containsValue(short value)
- Specified by:
containsValuein interfaceObjectShortMap<K>
-
forEachValue
public void forEachValue(ShortProcedure procedure)
- Specified by:
forEachValuein interfaceObjectShortMap<K>
-
forEachKey
public void forEachKey(Procedure<? super K> procedure)
- Specified by:
forEachKeyin interfaceObjectShortMap<K>
-
forEachKeyValue
public void forEachKeyValue(ObjectShortProcedure<? super K> procedure)
- Specified by:
forEachKeyValuein interfaceObjectShortMap<K>
-
select
public MutableObjectShortMap<K> select(ObjectShortPredicate<? super K> predicate)
- Specified by:
selectin interfaceMutableObjectShortMap<K>- Specified by:
selectin interfaceObjectShortMap<K>
-
reject
public MutableObjectShortMap<K> reject(ObjectShortPredicate<? super K> predicate)
- Specified by:
rejectin interfaceMutableObjectShortMap<K>- Specified by:
rejectin interfaceObjectShortMap<K>
-
shortIterator
public MutableShortIterator shortIterator()
Must be called in a synchronized block.- Specified by:
shortIteratorin interfaceMutableObjectShortMap<K>- Specified by:
shortIteratorin interfaceShortIterable
-
each
public void each(ShortProcedure procedure)
- Specified by:
eachin interfaceShortIterable- Since:
- 7.0.
-
count
public int count(ShortPredicate predicate)
- Specified by:
countin interfaceShortIterable
-
anySatisfy
public boolean anySatisfy(ShortPredicate predicate)
- Specified by:
anySatisfyin interfaceShortIterable
-
allSatisfy
public boolean allSatisfy(ShortPredicate predicate)
- Specified by:
allSatisfyin interfaceShortIterable
-
noneSatisfy
public boolean noneSatisfy(ShortPredicate predicate)
- Specified by:
noneSatisfyin interfaceShortIterable
-
select
public MutableShortCollection select(ShortPredicate predicate)
- Specified by:
selectin interfaceMutableObjectShortMap<K>- Specified by:
selectin interfaceShortIterable
-
reject
public MutableShortCollection reject(ShortPredicate predicate)
- Specified by:
rejectin interfaceMutableObjectShortMap<K>- Specified by:
rejectin interfaceShortIterable
-
detectIfNone
public short detectIfNone(ShortPredicate predicate, short ifNone)
- Specified by:
detectIfNonein interfaceShortIterable
-
collect
public <V1> MutableCollection<V1> collect(ShortToObjectFunction<? extends V1> function)
- Specified by:
collectin interfaceMutableObjectShortMap<K>- Specified by:
collectin interfaceShortIterable
-
sum
public long sum()
- Specified by:
sumin interfaceShortIterable
-
addToValue
public short addToValue(K key, short toBeAdded)
- Specified by:
addToValuein interfaceMutableObjectShortMap<K>
-
max
public short max()
- Specified by:
maxin interfaceShortIterable
-
maxIfEmpty
public short maxIfEmpty(short defaultValue)
- Specified by:
maxIfEmptyin interfaceShortIterable
-
min
public short min()
- Specified by:
minin interfaceShortIterable
-
minIfEmpty
public short minIfEmpty(short defaultValue)
- Specified by:
minIfEmptyin interfaceShortIterable
-
average
public double average()
- Specified by:
averagein interfaceShortIterable
-
median
public double median()
- Specified by:
medianin interfaceShortIterable
-
toSortedArray
public short[] toSortedArray()
- Specified by:
toSortedArrayin interfaceShortIterable
-
toSortedList
public MutableShortList toSortedList()
- Specified by:
toSortedListin interfaceShortIterable
-
toArray
public short[] toArray()
- Specified by:
toArrayin interfaceShortIterable
-
toArray
public short[] toArray(short[] target)
- Specified by:
toArrayin interfaceShortIterable
-
contains
public boolean contains(short value)
- Specified by:
containsin interfaceShortIterable
-
containsAll
public boolean containsAll(short... source)
- Specified by:
containsAllin interfaceShortIterable
-
containsAll
public boolean containsAll(ShortIterable source)
- Specified by:
containsAllin interfaceShortIterable
-
toList
public MutableShortList toList()
- Specified by:
toListin interfaceShortIterable
-
toSet
public MutableShortSet toSet()
- Specified by:
toSetin interfaceShortIterable
-
toBag
public MutableShortBag toBag()
- Specified by:
toBagin interfaceShortIterable
-
asLazy
public LazyShortIterable asLazy()
- Specified by:
asLazyin interfaceShortIterable
-
withKeyValue
public MutableObjectShortMap<K> withKeyValue(K key, short value)
- Specified by:
withKeyValuein interfaceMutableObjectShortMap<K>
-
withoutKey
public MutableObjectShortMap<K> withoutKey(K key)
- Specified by:
withoutKeyin interfaceMutableObjectShortMap<K>
-
withoutAllKeys
public MutableObjectShortMap<K> withoutAllKeys(Iterable<? extends K> keys)
- Specified by:
withoutAllKeysin interfaceMutableObjectShortMap<K>
-
asUnmodifiable
public MutableObjectShortMap<K> asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableObjectShortMap<K>
-
asSynchronized
public MutableObjectShortMap<K> asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableObjectShortMap<K>
-
toImmutable
public ImmutableObjectShortMap<K> toImmutable()
- Specified by:
toImmutablein interfaceObjectShortMap<K>
-
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 Set<K> keySet()
- Specified by:
keySetin interfaceObjectShortMap<K>
-
values
public MutableShortCollection values()
- Specified by:
valuesin interfaceObjectShortMap<K>
-
keysView
public LazyIterable<K> keysView()
- Specified by:
keysViewin interfaceObjectShortMap<K>
-
keyValuesView
public RichIterable<ObjectShortPair<K>> keyValuesView()
- Specified by:
keyValuesViewin interfaceObjectShortMap<K>
-
flipUniqueValues
public MutableShortObjectMap<K> flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceMutableObjectShortMap<K>- Specified by:
flipUniqueValuesin interfaceObjectShortMap<K>
-
toString
public String toString()
- Specified by:
toStringin interfaceObjectShortMap<K>- Specified by:
toStringin interfacePrimitiveIterable- 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, ObjectShortToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin interfaceShortIterable
-
chunk
public RichIterable<ShortIterable> chunk(int size)
- Specified by:
chunkin interfaceShortIterable
-
-