Class SynchronizedCharIntMap
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.SynchronizedCharIntMap
-
- All Implemented Interfaces:
Serializable
,IntIterable
,CharIntMap
,IntValuesMap
,MutableCharIntMap
,MutableIntValuesMap
,PrimitiveIterable
public class SynchronizedCharIntMap extends Object implements MutableCharIntMap, Serializable
A synchronized view of aMutableCharIntMap
. It is imperative that the user manually synchronize on the collection when iterating over it using theMutableIntIterator
as perCollections.synchronizedCollection(Collection)
.This file was automatically generated from template file synchronizedPrimitivePrimitiveMap.stg.
- Since:
- 3.1.
- See Also:
MutableCharIntMap.asSynchronized()
,MutableMap.asSynchronized()
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedCharIntMap(MutableCharIntMap map)
SynchronizedCharIntMap(MutableCharIntMap map, Object newLock)
-
Method Summary
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.CharIntMap
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.MutableCharIntMap
withAllKeyValues
-
-
-
-
Constructor Detail
-
SynchronizedCharIntMap
public SynchronizedCharIntMap(MutableCharIntMap map)
-
SynchronizedCharIntMap
public SynchronizedCharIntMap(MutableCharIntMap map, Object newLock)
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableIntValuesMap
-
put
public void put(char key, int value)
- Specified by:
put
in interfaceMutableCharIntMap
-
putPair
public void putPair(CharIntPair keyValuePair)
- Specified by:
putPair
in interfaceMutableCharIntMap
-
putAll
public void putAll(CharIntMap map)
- Specified by:
putAll
in interfaceMutableCharIntMap
-
updateValues
public void updateValues(CharIntToIntFunction function)
- Specified by:
updateValues
in interfaceMutableCharIntMap
-
removeKey
public void removeKey(char key)
- Specified by:
removeKey
in interfaceMutableCharIntMap
-
remove
public void remove(char key)
- Specified by:
remove
in interfaceMutableCharIntMap
-
removeKeyIfAbsent
public int removeKeyIfAbsent(char key, int value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableCharIntMap
-
getIfAbsentPut
public int getIfAbsentPut(char key, int value)
- Specified by:
getIfAbsentPut
in interfaceMutableCharIntMap
-
getAndPut
public int getAndPut(char key, int putValue, int defaultValue)
- Specified by:
getAndPut
in interfaceMutableCharIntMap
-
getIfAbsentPut
public int getIfAbsentPut(char key, IntFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableCharIntMap
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(char key, CharToIntFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableCharIntMap
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(char key, IntFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableCharIntMap
-
updateValue
public int updateValue(char key, int initialValueIfAbsent, IntToIntFunction function)
- Specified by:
updateValue
in interfaceMutableCharIntMap
-
get
public int get(char key)
- Specified by:
get
in interfaceCharIntMap
-
getIfAbsent
public int getIfAbsent(char key, int ifAbsent)
- Specified by:
getIfAbsent
in interfaceCharIntMap
-
getOrThrow
public int getOrThrow(char key)
- Specified by:
getOrThrow
in interfaceCharIntMap
-
containsKey
public boolean containsKey(char key)
- Specified by:
containsKey
in interfaceCharIntMap
-
containsValue
public boolean containsValue(int value)
- Specified by:
containsValue
in interfaceIntValuesMap
-
forEachValue
public void forEachValue(IntProcedure procedure)
- Specified by:
forEachValue
in interfaceIntValuesMap
-
forEachKey
public void forEachKey(CharProcedure procedure)
- Specified by:
forEachKey
in interfaceCharIntMap
-
forEachKeyValue
public void forEachKeyValue(CharIntProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceCharIntMap
-
keysView
public LazyCharIterable keysView()
- Specified by:
keysView
in interfaceCharIntMap
-
keyValuesView
public RichIterable<CharIntPair> keyValuesView()
- Specified by:
keyValuesView
in interfaceCharIntMap
-
flipUniqueValues
public MutableIntCharMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceCharIntMap
- Specified by:
flipUniqueValues
in interfaceMutableCharIntMap
-
select
public MutableCharIntMap select(CharIntPredicate predicate)
- Specified by:
select
in interfaceCharIntMap
- Specified by:
select
in interfaceMutableCharIntMap
-
reject
public MutableCharIntMap reject(CharIntPredicate predicate)
- Specified by:
reject
in interfaceCharIntMap
- Specified by:
reject
in interfaceMutableCharIntMap
-
intIterator
public MutableIntIterator intIterator()
This must be manually synchronized by the developer.- Specified by:
intIterator
in interfaceIntIterable
- Specified by:
intIterator
in interfaceMutableIntValuesMap
-
each
public void each(IntProcedure procedure)
- Specified by:
each
in interfaceIntIterable
- Since:
- 7.0.
-
count
public int count(IntPredicate predicate)
- Specified by:
count
in interfaceIntIterable
-
anySatisfy
public boolean anySatisfy(IntPredicate predicate)
- Specified by:
anySatisfy
in interfaceIntIterable
-
allSatisfy
public boolean allSatisfy(IntPredicate predicate)
- Specified by:
allSatisfy
in interfaceIntIterable
-
noneSatisfy
public boolean noneSatisfy(IntPredicate predicate)
- Specified by:
noneSatisfy
in interfaceIntIterable
-
select
public MutableIntBag select(IntPredicate predicate)
- Specified by:
select
in interfaceIntIterable
- Specified by:
select
in interfaceIntValuesMap
- Specified by:
select
in interfaceMutableIntValuesMap
-
reject
public MutableIntBag reject(IntPredicate predicate)
- Specified by:
reject
in interfaceIntIterable
- Specified by:
reject
in interfaceIntValuesMap
- Specified by:
reject
in interfaceMutableIntValuesMap
-
collect
public <V> MutableBag<V> collect(IntToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceIntIterable
- Specified by:
collect
in interfaceIntValuesMap
- Specified by:
collect
in interfaceMutableIntValuesMap
-
detectIfNone
public int detectIfNone(IntPredicate predicate, int ifNone)
- Specified by:
detectIfNone
in interfaceIntIterable
-
sum
public long sum()
- Specified by:
sum
in interfaceIntIterable
-
max
public int max()
- Specified by:
max
in interfaceIntIterable
-
maxIfEmpty
public int maxIfEmpty(int defaultValue)
- Specified by:
maxIfEmpty
in interfaceIntIterable
-
min
public int min()
- Specified by:
min
in interfaceIntIterable
-
minIfEmpty
public int minIfEmpty(int defaultValue)
- Specified by:
minIfEmpty
in interfaceIntIterable
-
average
public double average()
- Specified by:
average
in interfaceIntIterable
-
median
public double median()
- Specified by:
median
in interfaceIntIterable
-
addToValue
public int addToValue(char key, int toBeAdded)
- Specified by:
addToValue
in interfaceMutableCharIntMap
-
toSortedArray
public int[] toSortedArray()
- Specified by:
toSortedArray
in interfaceIntIterable
-
toSortedList
public MutableIntList toSortedList()
- Specified by:
toSortedList
in interfaceIntIterable
-
toArray
public int[] toArray()
- Specified by:
toArray
in interfaceIntIterable
-
toArray
public int[] toArray(int[] target)
- Specified by:
toArray
in interfaceIntIterable
-
contains
public boolean contains(int value)
- Specified by:
contains
in interfaceIntIterable
-
containsAll
public boolean containsAll(int... source)
- Specified by:
containsAll
in interfaceIntIterable
-
containsAll
public boolean containsAll(IntIterable source)
- Specified by:
containsAll
in interfaceIntIterable
-
toList
public MutableIntList toList()
- Specified by:
toList
in interfaceIntIterable
-
toSet
public MutableIntSet toSet()
- Specified by:
toSet
in interfaceIntIterable
-
toBag
public MutableIntBag toBag()
- Specified by:
toBag
in interfaceIntIterable
-
asLazy
public LazyIntIterable asLazy()
- Specified by:
asLazy
in interfaceIntIterable
-
withKeyValue
public MutableCharIntMap withKeyValue(char key, int value)
- Specified by:
withKeyValue
in interfaceMutableCharIntMap
-
withoutKey
public MutableCharIntMap withoutKey(char key)
- Specified by:
withoutKey
in interfaceMutableCharIntMap
-
withoutAllKeys
public MutableCharIntMap withoutAllKeys(CharIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableCharIntMap
-
asUnmodifiable
public MutableCharIntMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableCharIntMap
-
asSynchronized
public MutableCharIntMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableCharIntMap
-
toImmutable
public ImmutableCharIntMap toImmutable()
- Specified by:
toImmutable
in interfaceCharIntMap
-
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 MutableCharSet keySet()
- Specified by:
keySet
in interfaceCharIntMap
-
values
public MutableIntCollection values()
- Specified by:
values
in interfaceIntValuesMap
-
equals
public boolean equals(Object otherMap)
- Specified by:
equals
in interfaceCharIntMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceCharIntMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfaceCharIntMap
- Specified by:
toString
in interfacePrimitiveIterable
- 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, ObjectIntToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceIntIterable
-
chunk
public RichIterable<IntIterable> chunk(int size)
- Specified by:
chunk
in interfaceIntIterable
-
-