Class SynchronizedShortShortMap
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.SynchronizedShortShortMap
-
- All Implemented Interfaces:
Serializable
,MutableShortShortMap
,MutableShortValuesMap
,ShortShortMap
,ShortValuesMap
,PrimitiveIterable
,ShortIterable
public class SynchronizedShortShortMap extends Object implements MutableShortShortMap, Serializable
A synchronized view of aMutableShortShortMap
. It is imperative that the user manually synchronize on the collection when iterating over it using theMutableShortIterator
as perCollections.synchronizedCollection(Collection)
.This file was automatically generated from template file synchronizedPrimitivePrimitiveMap.stg.
- Since:
- 3.1.
- See Also:
MutableShortShortMap.asSynchronized()
,MutableMap.asSynchronized()
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedShortShortMap(MutableShortShortMap map)
SynchronizedShortShortMap(MutableShortShortMap map, Object newLock)
-
Method Summary
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableShortShortMap
withAllKeyValues
-
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
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ShortShortMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ShortValuesMap
tap
-
-
-
-
Constructor Detail
-
SynchronizedShortShortMap
public SynchronizedShortShortMap(MutableShortShortMap map)
-
SynchronizedShortShortMap
public SynchronizedShortShortMap(MutableShortShortMap map, Object newLock)
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableShortValuesMap
-
put
public void put(short key, short value)
- Specified by:
put
in interfaceMutableShortShortMap
-
putPair
public void putPair(ShortShortPair keyValuePair)
- Specified by:
putPair
in interfaceMutableShortShortMap
-
putAll
public void putAll(ShortShortMap map)
- Specified by:
putAll
in interfaceMutableShortShortMap
-
updateValues
public void updateValues(ShortShortToShortFunction function)
- Specified by:
updateValues
in interfaceMutableShortShortMap
-
removeKey
public void removeKey(short key)
- Specified by:
removeKey
in interfaceMutableShortShortMap
-
remove
public void remove(short key)
- Specified by:
remove
in interfaceMutableShortShortMap
-
removeKeyIfAbsent
public short removeKeyIfAbsent(short key, short value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableShortShortMap
-
getIfAbsentPut
public short getIfAbsentPut(short key, short value)
- Specified by:
getIfAbsentPut
in interfaceMutableShortShortMap
-
getAndPut
public short getAndPut(short key, short putValue, short defaultValue)
- Specified by:
getAndPut
in interfaceMutableShortShortMap
-
getIfAbsentPut
public short getIfAbsentPut(short key, ShortFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableShortShortMap
-
getIfAbsentPutWithKey
public short getIfAbsentPutWithKey(short key, ShortToShortFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableShortShortMap
-
getIfAbsentPutWith
public <P> short getIfAbsentPutWith(short key, ShortFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableShortShortMap
-
updateValue
public short updateValue(short key, short initialValueIfAbsent, ShortToShortFunction function)
- Specified by:
updateValue
in interfaceMutableShortShortMap
-
get
public short get(short key)
- Specified by:
get
in interfaceShortShortMap
-
getIfAbsent
public short getIfAbsent(short key, short ifAbsent)
- Specified by:
getIfAbsent
in interfaceShortShortMap
-
getOrThrow
public short getOrThrow(short key)
- Specified by:
getOrThrow
in interfaceShortShortMap
-
containsKey
public boolean containsKey(short key)
- Specified by:
containsKey
in interfaceShortShortMap
-
containsValue
public boolean containsValue(short value)
- Specified by:
containsValue
in interfaceShortValuesMap
-
forEachValue
public void forEachValue(ShortProcedure procedure)
- Specified by:
forEachValue
in interfaceShortValuesMap
-
forEachKey
public void forEachKey(ShortProcedure procedure)
- Specified by:
forEachKey
in interfaceShortShortMap
-
forEachKeyValue
public void forEachKeyValue(ShortShortProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceShortShortMap
-
keysView
public LazyShortIterable keysView()
- Specified by:
keysView
in interfaceShortShortMap
-
keyValuesView
public RichIterable<ShortShortPair> keyValuesView()
- Specified by:
keyValuesView
in interfaceShortShortMap
-
flipUniqueValues
public MutableShortShortMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceMutableShortShortMap
- Specified by:
flipUniqueValues
in interfaceShortShortMap
-
select
public MutableShortShortMap select(ShortShortPredicate predicate)
- Specified by:
select
in interfaceMutableShortShortMap
- Specified by:
select
in interfaceShortShortMap
-
reject
public MutableShortShortMap reject(ShortShortPredicate predicate)
- Specified by:
reject
in interfaceMutableShortShortMap
- Specified by:
reject
in interfaceShortShortMap
-
shortIterator
public MutableShortIterator shortIterator()
This must be manually synchronized by the developer.- Specified by:
shortIterator
in interfaceMutableShortValuesMap
- Specified by:
shortIterator
in interfaceShortIterable
-
each
public void each(ShortProcedure procedure)
- Specified by:
each
in interfaceShortIterable
- Since:
- 7.0.
-
count
public int count(ShortPredicate predicate)
- Specified by:
count
in interfaceShortIterable
-
anySatisfy
public boolean anySatisfy(ShortPredicate predicate)
- Specified by:
anySatisfy
in interfaceShortIterable
-
allSatisfy
public boolean allSatisfy(ShortPredicate predicate)
- Specified by:
allSatisfy
in interfaceShortIterable
-
noneSatisfy
public boolean noneSatisfy(ShortPredicate predicate)
- Specified by:
noneSatisfy
in interfaceShortIterable
-
select
public MutableShortBag select(ShortPredicate predicate)
- Specified by:
select
in interfaceMutableShortValuesMap
- Specified by:
select
in interfaceShortIterable
- Specified by:
select
in interfaceShortValuesMap
-
reject
public MutableShortBag reject(ShortPredicate predicate)
- Specified by:
reject
in interfaceMutableShortValuesMap
- Specified by:
reject
in interfaceShortIterable
- Specified by:
reject
in interfaceShortValuesMap
-
collect
public <V> MutableBag<V> collect(ShortToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceMutableShortValuesMap
- Specified by:
collect
in interfaceShortIterable
- Specified by:
collect
in interfaceShortValuesMap
-
detectIfNone
public short detectIfNone(ShortPredicate predicate, short ifNone)
- Specified by:
detectIfNone
in interfaceShortIterable
-
sum
public long sum()
- Specified by:
sum
in interfaceShortIterable
-
max
public short max()
- Specified by:
max
in interfaceShortIterable
-
maxIfEmpty
public short maxIfEmpty(short defaultValue)
- Specified by:
maxIfEmpty
in interfaceShortIterable
-
min
public short min()
- Specified by:
min
in interfaceShortIterable
-
minIfEmpty
public short minIfEmpty(short defaultValue)
- Specified by:
minIfEmpty
in interfaceShortIterable
-
average
public double average()
- Specified by:
average
in interfaceShortIterable
-
median
public double median()
- Specified by:
median
in interfaceShortIterable
-
addToValue
public short addToValue(short key, short toBeAdded)
- Specified by:
addToValue
in interfaceMutableShortShortMap
-
toSortedArray
public short[] toSortedArray()
- Specified by:
toSortedArray
in interfaceShortIterable
-
toSortedList
public MutableShortList toSortedList()
- Specified by:
toSortedList
in interfaceShortIterable
-
toArray
public short[] toArray()
- Specified by:
toArray
in interfaceShortIterable
-
toArray
public short[] toArray(short[] target)
- Specified by:
toArray
in interfaceShortIterable
-
contains
public boolean contains(short value)
- Specified by:
contains
in interfaceShortIterable
-
containsAll
public boolean containsAll(short... source)
- Specified by:
containsAll
in interfaceShortIterable
-
containsAll
public boolean containsAll(ShortIterable source)
- Specified by:
containsAll
in interfaceShortIterable
-
toList
public MutableShortList toList()
- Specified by:
toList
in interfaceShortIterable
-
toSet
public MutableShortSet toSet()
- Specified by:
toSet
in interfaceShortIterable
-
toBag
public MutableShortBag toBag()
- Specified by:
toBag
in interfaceShortIterable
-
asLazy
public LazyShortIterable asLazy()
- Specified by:
asLazy
in interfaceShortIterable
-
withKeyValue
public MutableShortShortMap withKeyValue(short key, short value)
- Specified by:
withKeyValue
in interfaceMutableShortShortMap
-
withoutKey
public MutableShortShortMap withoutKey(short key)
- Specified by:
withoutKey
in interfaceMutableShortShortMap
-
withoutAllKeys
public MutableShortShortMap withoutAllKeys(ShortIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableShortShortMap
-
asUnmodifiable
public MutableShortShortMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableShortShortMap
-
asSynchronized
public MutableShortShortMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableShortShortMap
-
toImmutable
public ImmutableShortShortMap toImmutable()
- Specified by:
toImmutable
in interfaceShortShortMap
-
size
public int size()
- Specified by:
size
in interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
- Specified by:
notEmpty
in interfacePrimitiveIterable
-
keySet
public MutableShortSet keySet()
- Specified by:
keySet
in interfaceShortShortMap
-
values
public MutableShortCollection values()
- Specified by:
values
in interfaceShortValuesMap
-
equals
public boolean equals(Object otherMap)
- Specified by:
equals
in interfaceShortShortMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceShortShortMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfacePrimitiveIterable
- Specified by:
toString
in interfaceShortShortMap
- Overrides:
toString
in classObject
-
makeString
public String makeString()
- Specified by:
makeString
in interfacePrimitiveIterable
-
makeString
public String makeString(String separator)
- Specified by:
makeString
in interfacePrimitiveIterable
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendString
in interfacePrimitiveIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectShortToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceShortIterable
-
chunk
public RichIterable<ShortIterable> chunk(int size)
- Specified by:
chunk
in interfaceShortIterable
-
-