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 theMutableIntIteratoras 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:
clearin interfaceMutableIntValuesMap
-
put
public void put(char key, int value)- Specified by:
putin interfaceMutableCharIntMap
-
putPair
public void putPair(CharIntPair keyValuePair)
- Specified by:
putPairin interfaceMutableCharIntMap
-
putAll
public void putAll(CharIntMap map)
- Specified by:
putAllin interfaceMutableCharIntMap
-
updateValues
public void updateValues(CharIntToIntFunction function)
- Specified by:
updateValuesin interfaceMutableCharIntMap
-
removeKey
public void removeKey(char key)
- Specified by:
removeKeyin interfaceMutableCharIntMap
-
remove
public void remove(char key)
- Specified by:
removein interfaceMutableCharIntMap
-
removeKeyIfAbsent
public int removeKeyIfAbsent(char key, int value)- Specified by:
removeKeyIfAbsentin interfaceMutableCharIntMap
-
getIfAbsentPut
public int getIfAbsentPut(char key, int value)- Specified by:
getIfAbsentPutin interfaceMutableCharIntMap
-
getAndPut
public int getAndPut(char key, int putValue, int defaultValue)- Specified by:
getAndPutin interfaceMutableCharIntMap
-
getIfAbsentPut
public int getIfAbsentPut(char key, IntFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableCharIntMap
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(char key, CharToIntFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableCharIntMap
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(char key, IntFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableCharIntMap
-
updateValue
public int updateValue(char key, int initialValueIfAbsent, IntToIntFunction function)- Specified by:
updateValuein interfaceMutableCharIntMap
-
get
public int get(char key)
- Specified by:
getin interfaceCharIntMap
-
getIfAbsent
public int getIfAbsent(char key, int ifAbsent)- Specified by:
getIfAbsentin interfaceCharIntMap
-
getOrThrow
public int getOrThrow(char key)
- Specified by:
getOrThrowin interfaceCharIntMap
-
containsKey
public boolean containsKey(char key)
- Specified by:
containsKeyin interfaceCharIntMap
-
containsValue
public boolean containsValue(int value)
- Specified by:
containsValuein interfaceIntValuesMap
-
forEachValue
public void forEachValue(IntProcedure procedure)
- Specified by:
forEachValuein interfaceIntValuesMap
-
forEachKey
public void forEachKey(CharProcedure procedure)
- Specified by:
forEachKeyin interfaceCharIntMap
-
forEachKeyValue
public void forEachKeyValue(CharIntProcedure procedure)
- Specified by:
forEachKeyValuein interfaceCharIntMap
-
keysView
public LazyCharIterable keysView()
- Specified by:
keysViewin interfaceCharIntMap
-
keyValuesView
public RichIterable<CharIntPair> keyValuesView()
- Specified by:
keyValuesViewin interfaceCharIntMap
-
flipUniqueValues
public MutableIntCharMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceCharIntMap- Specified by:
flipUniqueValuesin interfaceMutableCharIntMap
-
select
public MutableCharIntMap select(CharIntPredicate predicate)
- Specified by:
selectin interfaceCharIntMap- Specified by:
selectin interfaceMutableCharIntMap
-
reject
public MutableCharIntMap reject(CharIntPredicate predicate)
- Specified by:
rejectin interfaceCharIntMap- Specified by:
rejectin interfaceMutableCharIntMap
-
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(char key, int toBeAdded)- Specified by:
addToValuein interfaceMutableCharIntMap
-
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 MutableCharIntMap withKeyValue(char key, int value)
- Specified by:
withKeyValuein interfaceMutableCharIntMap
-
withoutKey
public MutableCharIntMap withoutKey(char key)
- Specified by:
withoutKeyin interfaceMutableCharIntMap
-
withoutAllKeys
public MutableCharIntMap withoutAllKeys(CharIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableCharIntMap
-
asUnmodifiable
public MutableCharIntMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableCharIntMap
-
asSynchronized
public MutableCharIntMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableCharIntMap
-
toImmutable
public ImmutableCharIntMap toImmutable()
- Specified by:
toImmutablein interfaceCharIntMap
-
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 MutableCharSet keySet()
- Specified by:
keySetin interfaceCharIntMap
-
values
public MutableIntCollection values()
- Specified by:
valuesin interfaceIntValuesMap
-
equals
public boolean equals(Object otherMap)
- Specified by:
equalsin interfaceCharIntMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceCharIntMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfaceCharIntMap- 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, ObjectIntToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin interfaceIntIterable
-
chunk
public RichIterable<IntIterable> chunk(int size)
- Specified by:
chunkin interfaceIntIterable
-
-