Class SynchronizedShortLongMap
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.SynchronizedShortLongMap
-
- All Implemented Interfaces:
Serializable,LongIterable,LongValuesMap,MutableLongValuesMap,MutableShortLongMap,ShortLongMap,PrimitiveIterable
public class SynchronizedShortLongMap extends Object implements MutableShortLongMap, Serializable
A synchronized view of aMutableShortLongMap. It is imperative that the user manually synchronize on the collection when iterating over it using theMutableLongIteratoras perCollections.synchronizedCollection(Collection).This file was automatically generated from template file synchronizedPrimitivePrimitiveMap.stg.
- Since:
- 3.1.
- See Also:
MutableShortLongMap.asSynchronized(),MutableMap.asSynchronized(), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedShortLongMap(MutableShortLongMap map)SynchronizedShortLongMap(MutableShortLongMap map, Object newLock)
-
Method Summary
-
Methods inherited from interface org.eclipse.collections.api.LongIterable
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.LongValuesMap
tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableShortLongMap
withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ShortLongMap
injectIntoKeyValue
-
-
-
-
Constructor Detail
-
SynchronizedShortLongMap
public SynchronizedShortLongMap(MutableShortLongMap map)
-
SynchronizedShortLongMap
public SynchronizedShortLongMap(MutableShortLongMap map, Object newLock)
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clearin interfaceMutableLongValuesMap
-
put
public void put(short key, long value)- Specified by:
putin interfaceMutableShortLongMap
-
putPair
public void putPair(ShortLongPair keyValuePair)
- Specified by:
putPairin interfaceMutableShortLongMap
-
putAll
public void putAll(ShortLongMap map)
- Specified by:
putAllin interfaceMutableShortLongMap
-
updateValues
public void updateValues(ShortLongToLongFunction function)
- Specified by:
updateValuesin interfaceMutableShortLongMap
-
removeKey
public void removeKey(short key)
- Specified by:
removeKeyin interfaceMutableShortLongMap
-
remove
public void remove(short key)
- Specified by:
removein interfaceMutableShortLongMap
-
removeKeyIfAbsent
public long removeKeyIfAbsent(short key, long value)- Specified by:
removeKeyIfAbsentin interfaceMutableShortLongMap
-
getIfAbsentPut
public long getIfAbsentPut(short key, long value)- Specified by:
getIfAbsentPutin interfaceMutableShortLongMap
-
getAndPut
public long getAndPut(short key, long putValue, long defaultValue)- Specified by:
getAndPutin interfaceMutableShortLongMap
-
getIfAbsentPut
public long getIfAbsentPut(short key, LongFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableShortLongMap
-
getIfAbsentPutWithKey
public long getIfAbsentPutWithKey(short key, ShortToLongFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableShortLongMap
-
getIfAbsentPutWith
public <P> long getIfAbsentPutWith(short key, LongFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableShortLongMap
-
updateValue
public long updateValue(short key, long initialValueIfAbsent, LongToLongFunction function)- Specified by:
updateValuein interfaceMutableShortLongMap
-
get
public long get(short key)
- Specified by:
getin interfaceShortLongMap
-
getIfAbsent
public long getIfAbsent(short key, long ifAbsent)- Specified by:
getIfAbsentin interfaceShortLongMap
-
getOrThrow
public long getOrThrow(short key)
- Specified by:
getOrThrowin interfaceShortLongMap
-
containsKey
public boolean containsKey(short key)
- Specified by:
containsKeyin interfaceShortLongMap
-
containsValue
public boolean containsValue(long value)
- Specified by:
containsValuein interfaceLongValuesMap
-
forEachValue
public void forEachValue(LongProcedure procedure)
- Specified by:
forEachValuein interfaceLongValuesMap
-
forEachKey
public void forEachKey(ShortProcedure procedure)
- Specified by:
forEachKeyin interfaceShortLongMap
-
forEachKeyValue
public void forEachKeyValue(ShortLongProcedure procedure)
- Specified by:
forEachKeyValuein interfaceShortLongMap
-
keysView
public LazyShortIterable keysView()
- Specified by:
keysViewin interfaceShortLongMap
-
keyValuesView
public RichIterable<ShortLongPair> keyValuesView()
- Specified by:
keyValuesViewin interfaceShortLongMap
-
flipUniqueValues
public MutableLongShortMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceMutableShortLongMap- Specified by:
flipUniqueValuesin interfaceShortLongMap
-
select
public MutableShortLongMap select(ShortLongPredicate predicate)
- Specified by:
selectin interfaceMutableShortLongMap- Specified by:
selectin interfaceShortLongMap
-
reject
public MutableShortLongMap reject(ShortLongPredicate predicate)
- Specified by:
rejectin interfaceMutableShortLongMap- Specified by:
rejectin interfaceShortLongMap
-
longIterator
public MutableLongIterator longIterator()
This must be manually synchronized by the developer.- Specified by:
longIteratorin interfaceLongIterable- Specified by:
longIteratorin interfaceMutableLongValuesMap
-
each
public void each(LongProcedure procedure)
- Specified by:
eachin interfaceLongIterable- Since:
- 7.0.
-
count
public int count(LongPredicate predicate)
- Specified by:
countin interfaceLongIterable
-
anySatisfy
public boolean anySatisfy(LongPredicate predicate)
- Specified by:
anySatisfyin interfaceLongIterable
-
allSatisfy
public boolean allSatisfy(LongPredicate predicate)
- Specified by:
allSatisfyin interfaceLongIterable
-
noneSatisfy
public boolean noneSatisfy(LongPredicate predicate)
- Specified by:
noneSatisfyin interfaceLongIterable
-
select
public MutableLongBag select(LongPredicate predicate)
- Specified by:
selectin interfaceLongIterable- Specified by:
selectin interfaceLongValuesMap- Specified by:
selectin interfaceMutableLongValuesMap
-
reject
public MutableLongBag reject(LongPredicate predicate)
- Specified by:
rejectin interfaceLongIterable- Specified by:
rejectin interfaceLongValuesMap- Specified by:
rejectin interfaceMutableLongValuesMap
-
collect
public <V> MutableBag<V> collect(LongToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceLongIterable- Specified by:
collectin interfaceLongValuesMap- Specified by:
collectin interfaceMutableLongValuesMap
-
detectIfNone
public long detectIfNone(LongPredicate predicate, long ifNone)
- Specified by:
detectIfNonein interfaceLongIterable
-
sum
public long sum()
- Specified by:
sumin interfaceLongIterable
-
max
public long max()
- Specified by:
maxin interfaceLongIterable
-
maxIfEmpty
public long maxIfEmpty(long defaultValue)
- Specified by:
maxIfEmptyin interfaceLongIterable
-
min
public long min()
- Specified by:
minin interfaceLongIterable
-
minIfEmpty
public long minIfEmpty(long defaultValue)
- Specified by:
minIfEmptyin interfaceLongIterable
-
average
public double average()
- Specified by:
averagein interfaceLongIterable
-
median
public double median()
- Specified by:
medianin interfaceLongIterable
-
addToValue
public long addToValue(short key, long toBeAdded)- Specified by:
addToValuein interfaceMutableShortLongMap
-
toSortedArray
public long[] toSortedArray()
- Specified by:
toSortedArrayin interfaceLongIterable
-
toSortedList
public MutableLongList toSortedList()
- Specified by:
toSortedListin interfaceLongIterable
-
toArray
public long[] toArray()
- Specified by:
toArrayin interfaceLongIterable
-
toArray
public long[] toArray(long[] target)
- Specified by:
toArrayin interfaceLongIterable
-
contains
public boolean contains(long value)
- Specified by:
containsin interfaceLongIterable
-
containsAll
public boolean containsAll(long... source)
- Specified by:
containsAllin interfaceLongIterable
-
containsAll
public boolean containsAll(LongIterable source)
- Specified by:
containsAllin interfaceLongIterable
-
toList
public MutableLongList toList()
- Specified by:
toListin interfaceLongIterable
-
toSet
public MutableLongSet toSet()
- Specified by:
toSetin interfaceLongIterable
-
toBag
public MutableLongBag toBag()
- Specified by:
toBagin interfaceLongIterable
-
asLazy
public LazyLongIterable asLazy()
- Specified by:
asLazyin interfaceLongIterable
-
withKeyValue
public MutableShortLongMap withKeyValue(short key, long value)
- Specified by:
withKeyValuein interfaceMutableShortLongMap
-
withoutKey
public MutableShortLongMap withoutKey(short key)
- Specified by:
withoutKeyin interfaceMutableShortLongMap
-
withoutAllKeys
public MutableShortLongMap withoutAllKeys(ShortIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableShortLongMap
-
asUnmodifiable
public MutableShortLongMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableShortLongMap
-
asSynchronized
public MutableShortLongMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableShortLongMap
-
toImmutable
public ImmutableShortLongMap toImmutable()
- Specified by:
toImmutablein interfaceShortLongMap
-
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 interfaceShortLongMap
-
values
public MutableLongCollection values()
- Specified by:
valuesin interfaceLongValuesMap
-
equals
public boolean equals(Object otherMap)
- Specified by:
equalsin interfaceShortLongMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceShortLongMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfacePrimitiveIterable- Specified by:
toStringin interfaceShortLongMap- 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, ObjectLongToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin interfaceLongIterable
-
chunk
public RichIterable<LongIterable> chunk(int size)
- Specified by:
chunkin interfaceLongIterable
-
-