Class SynchronizedIntIntMap
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.SynchronizedIntIntMap
-
- All Implemented Interfaces:
Serializable,IntIterable,IntIntMap,IntValuesMap,MutableIntIntMap,MutableIntValuesMap,PrimitiveIterable
public class SynchronizedIntIntMap extends Object implements MutableIntIntMap, Serializable
A synchronized view of aMutableIntIntMap. 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:
MutableIntIntMap.asSynchronized(),MutableMap.asSynchronized(), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedIntIntMap(MutableIntIntMap map)SynchronizedIntIntMap(MutableIntIntMap map, Object newLock)
-
Method Summary
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.IntIntMap
injectIntoKeyValue
-
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.MutableIntIntMap
withAllKeyValues
-
-
-
-
Constructor Detail
-
SynchronizedIntIntMap
public SynchronizedIntIntMap(MutableIntIntMap map)
-
SynchronizedIntIntMap
public SynchronizedIntIntMap(MutableIntIntMap map, Object newLock)
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clearin interfaceMutableIntValuesMap
-
put
public void put(int key, int value)- Specified by:
putin interfaceMutableIntIntMap
-
putPair
public void putPair(IntIntPair keyValuePair)
- Specified by:
putPairin interfaceMutableIntIntMap
-
putAll
public void putAll(IntIntMap map)
- Specified by:
putAllin interfaceMutableIntIntMap
-
updateValues
public void updateValues(IntIntToIntFunction function)
- Specified by:
updateValuesin interfaceMutableIntIntMap
-
removeKey
public void removeKey(int key)
- Specified by:
removeKeyin interfaceMutableIntIntMap
-
remove
public void remove(int key)
- Specified by:
removein interfaceMutableIntIntMap
-
removeKeyIfAbsent
public int removeKeyIfAbsent(int key, int value)- Specified by:
removeKeyIfAbsentin interfaceMutableIntIntMap
-
getIfAbsentPut
public int getIfAbsentPut(int key, int value)- Specified by:
getIfAbsentPutin interfaceMutableIntIntMap
-
getAndPut
public int getAndPut(int key, int putValue, int defaultValue)- Specified by:
getAndPutin interfaceMutableIntIntMap
-
getIfAbsentPut
public int getIfAbsentPut(int key, IntFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableIntIntMap
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(int key, IntToIntFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableIntIntMap
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(int key, IntFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableIntIntMap
-
updateValue
public int updateValue(int key, int initialValueIfAbsent, IntToIntFunction function)- Specified by:
updateValuein interfaceMutableIntIntMap
-
getIfAbsent
public int getIfAbsent(int key, int ifAbsent)- Specified by:
getIfAbsentin interfaceIntIntMap
-
getOrThrow
public int getOrThrow(int key)
- Specified by:
getOrThrowin interfaceIntIntMap
-
containsKey
public boolean containsKey(int key)
- Specified by:
containsKeyin interfaceIntIntMap
-
containsValue
public boolean containsValue(int value)
- Specified by:
containsValuein interfaceIntValuesMap
-
forEachValue
public void forEachValue(IntProcedure procedure)
- Specified by:
forEachValuein interfaceIntValuesMap
-
forEachKey
public void forEachKey(IntProcedure procedure)
- Specified by:
forEachKeyin interfaceIntIntMap
-
forEachKeyValue
public void forEachKeyValue(IntIntProcedure procedure)
- Specified by:
forEachKeyValuein interfaceIntIntMap
-
allSatisfyKeyValue
public boolean allSatisfyKeyValue(IntIntPredicate predicate)
- Specified by:
allSatisfyKeyValuein interfaceIntIntMap- Since:
- 12.0
-
keysView
public LazyIntIterable keysView()
-
keyValuesView
public RichIterable<IntIntPair> keyValuesView()
- Specified by:
keyValuesViewin interfaceIntIntMap
-
flipUniqueValues
public MutableIntIntMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceIntIntMap- Specified by:
flipUniqueValuesin interfaceMutableIntIntMap
-
select
public MutableIntIntMap select(IntIntPredicate predicate)
- Specified by:
selectin interfaceIntIntMap- Specified by:
selectin interfaceMutableIntIntMap
-
reject
public MutableIntIntMap reject(IntIntPredicate predicate)
- Specified by:
rejectin interfaceIntIntMap- Specified by:
rejectin interfaceMutableIntIntMap
-
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(int key, int toBeAdded)- Specified by:
addToValuein interfaceMutableIntIntMap
-
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 MutableIntIntMap withKeyValue(int key, int value)
- Specified by:
withKeyValuein interfaceMutableIntIntMap
-
withoutKey
public MutableIntIntMap withoutKey(int key)
- Specified by:
withoutKeyin interfaceMutableIntIntMap
-
withoutAllKeys
public MutableIntIntMap withoutAllKeys(IntIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableIntIntMap
-
asUnmodifiable
public MutableIntIntMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableIntIntMap
-
asSynchronized
public MutableIntIntMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableIntIntMap
-
toImmutable
public ImmutableIntIntMap toImmutable()
- Specified by:
toImmutablein interfaceIntIntMap
-
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 MutableIntSet keySet()
-
values
public MutableIntCollection values()
- Specified by:
valuesin interfaceIntValuesMap
-
equals
public boolean equals(Object otherMap)
-
hashCode
public int hashCode()
-
toString
public String toString()
-
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
-
-