Class SynchronizedObjectCharMap<K>
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.SynchronizedObjectCharMap<K>
-
- All Implemented Interfaces:
Serializable
,CharIterable
,MutableObjectCharMap<K>
,ObjectCharMap<K>
,PrimitiveIterable
public class SynchronizedObjectCharMap<K> extends Object implements MutableObjectCharMap<K>, Serializable
A synchronized view of aMutableObjectCharMap
. It is imperative that the user manually synchronize on the collection when iterating over it using the CharIterator as perCollections.synchronizedCollection(Collection)
.This file was automatically generated from template file synchronizedObjectPrimitiveMap.stg.
- Since:
- 3.1.
- See Also:
MutableObjectCharMap.asSynchronized()
,MutableMap.asSynchronized()
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedObjectCharMap(MutableObjectCharMap<K> map)
SynchronizedObjectCharMap(MutableObjectCharMap<K> map, Object newLock)
-
Method Summary
-
Methods inherited from interface org.eclipse.collections.api.CharIterable
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.MutableObjectCharMap
tap, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ObjectCharMap
injectIntoKeyValue
-
-
-
-
Constructor Detail
-
SynchronizedObjectCharMap
public SynchronizedObjectCharMap(MutableObjectCharMap<K> map)
-
SynchronizedObjectCharMap
public SynchronizedObjectCharMap(MutableObjectCharMap<K> map, Object newLock)
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableObjectCharMap<K>
-
put
public void put(K key, char value)
- Specified by:
put
in interfaceMutableObjectCharMap<K>
-
putPair
public void putPair(ObjectCharPair<K> keyValuePair)
- Specified by:
putPair
in interfaceMutableObjectCharMap<K>
-
putAll
public void putAll(ObjectCharMap<? extends K> map)
- Specified by:
putAll
in interfaceMutableObjectCharMap<K>
-
updateValues
public void updateValues(ObjectCharToCharFunction<? super K> function)
- Specified by:
updateValues
in interfaceMutableObjectCharMap<K>
-
removeKey
public void removeKey(K key)
- Specified by:
removeKey
in interfaceMutableObjectCharMap<K>
-
remove
public void remove(Object key)
- Specified by:
remove
in interfaceMutableObjectCharMap<K>
-
removeKeyIfAbsent
public char removeKeyIfAbsent(K key, char value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableObjectCharMap<K>
-
getIfAbsentPut
public char getIfAbsentPut(K key, char value)
- Specified by:
getIfAbsentPut
in interfaceMutableObjectCharMap<K>
-
getAndPut
public char getAndPut(K key, char putValue, char defaultValue)
- Specified by:
getAndPut
in interfaceMutableObjectCharMap<K>
-
getIfAbsentPut
public char getIfAbsentPut(K key, CharFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableObjectCharMap<K>
-
getIfAbsentPutWithKey
public char getIfAbsentPutWithKey(K key, CharFunction<? super K> function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableObjectCharMap<K>
-
getIfAbsentPutWith
public <P> char getIfAbsentPutWith(K key, CharFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableObjectCharMap<K>
-
updateValue
public char updateValue(K key, char initialValueIfAbsent, CharToCharFunction function)
- Specified by:
updateValue
in interfaceMutableObjectCharMap<K>
-
get
public char get(Object key)
- Specified by:
get
in interfaceObjectCharMap<K>
-
getOrThrow
public char getOrThrow(Object key)
- Specified by:
getOrThrow
in interfaceObjectCharMap<K>
-
getIfAbsent
public char getIfAbsent(Object key, char ifAbsent)
- Specified by:
getIfAbsent
in interfaceObjectCharMap<K>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceObjectCharMap<K>
-
containsValue
public boolean containsValue(char value)
- Specified by:
containsValue
in interfaceObjectCharMap<K>
-
forEachValue
public void forEachValue(CharProcedure procedure)
- Specified by:
forEachValue
in interfaceObjectCharMap<K>
-
forEachKey
public void forEachKey(Procedure<? super K> procedure)
- Specified by:
forEachKey
in interfaceObjectCharMap<K>
-
forEachKeyValue
public void forEachKeyValue(ObjectCharProcedure<? super K> procedure)
- Specified by:
forEachKeyValue
in interfaceObjectCharMap<K>
-
select
public MutableObjectCharMap<K> select(ObjectCharPredicate<? super K> predicate)
- Specified by:
select
in interfaceMutableObjectCharMap<K>
- Specified by:
select
in interfaceObjectCharMap<K>
-
reject
public MutableObjectCharMap<K> reject(ObjectCharPredicate<? super K> predicate)
- Specified by:
reject
in interfaceMutableObjectCharMap<K>
- Specified by:
reject
in interfaceObjectCharMap<K>
-
charIterator
public MutableCharIterator charIterator()
Must be called in a synchronized block.- Specified by:
charIterator
in interfaceCharIterable
- Specified by:
charIterator
in interfaceMutableObjectCharMap<K>
-
each
public void each(CharProcedure procedure)
- Specified by:
each
in interfaceCharIterable
- Since:
- 7.0.
-
count
public int count(CharPredicate predicate)
- Specified by:
count
in interfaceCharIterable
-
anySatisfy
public boolean anySatisfy(CharPredicate predicate)
- Specified by:
anySatisfy
in interfaceCharIterable
-
allSatisfy
public boolean allSatisfy(CharPredicate predicate)
- Specified by:
allSatisfy
in interfaceCharIterable
-
noneSatisfy
public boolean noneSatisfy(CharPredicate predicate)
- Specified by:
noneSatisfy
in interfaceCharIterable
-
select
public MutableCharCollection select(CharPredicate predicate)
- Specified by:
select
in interfaceCharIterable
- Specified by:
select
in interfaceMutableObjectCharMap<K>
-
reject
public MutableCharCollection reject(CharPredicate predicate)
- Specified by:
reject
in interfaceCharIterable
- Specified by:
reject
in interfaceMutableObjectCharMap<K>
-
detectIfNone
public char detectIfNone(CharPredicate predicate, char ifNone)
- Specified by:
detectIfNone
in interfaceCharIterable
-
collect
public <V1> MutableCollection<V1> collect(CharToObjectFunction<? extends V1> function)
- Specified by:
collect
in interfaceCharIterable
- Specified by:
collect
in interfaceMutableObjectCharMap<K>
-
sum
public long sum()
- Specified by:
sum
in interfaceCharIterable
-
addToValue
public char addToValue(K key, char toBeAdded)
- Specified by:
addToValue
in interfaceMutableObjectCharMap<K>
-
max
public char max()
- Specified by:
max
in interfaceCharIterable
-
maxIfEmpty
public char maxIfEmpty(char defaultValue)
- Specified by:
maxIfEmpty
in interfaceCharIterable
-
min
public char min()
- Specified by:
min
in interfaceCharIterable
-
minIfEmpty
public char minIfEmpty(char defaultValue)
- Specified by:
minIfEmpty
in interfaceCharIterable
-
average
public double average()
- Specified by:
average
in interfaceCharIterable
-
median
public double median()
- Specified by:
median
in interfaceCharIterable
-
toSortedArray
public char[] toSortedArray()
- Specified by:
toSortedArray
in interfaceCharIterable
-
toSortedList
public MutableCharList toSortedList()
- Specified by:
toSortedList
in interfaceCharIterable
-
toArray
public char[] toArray()
- Specified by:
toArray
in interfaceCharIterable
-
toArray
public char[] toArray(char[] target)
- Specified by:
toArray
in interfaceCharIterable
-
contains
public boolean contains(char value)
- Specified by:
contains
in interfaceCharIterable
-
containsAll
public boolean containsAll(char... source)
- Specified by:
containsAll
in interfaceCharIterable
-
containsAll
public boolean containsAll(CharIterable source)
- Specified by:
containsAll
in interfaceCharIterable
-
toList
public MutableCharList toList()
- Specified by:
toList
in interfaceCharIterable
-
toSet
public MutableCharSet toSet()
- Specified by:
toSet
in interfaceCharIterable
-
toBag
public MutableCharBag toBag()
- Specified by:
toBag
in interfaceCharIterable
-
asLazy
public LazyCharIterable asLazy()
- Specified by:
asLazy
in interfaceCharIterable
-
withKeyValue
public MutableObjectCharMap<K> withKeyValue(K key, char value)
- Specified by:
withKeyValue
in interfaceMutableObjectCharMap<K>
-
withoutKey
public MutableObjectCharMap<K> withoutKey(K key)
- Specified by:
withoutKey
in interfaceMutableObjectCharMap<K>
-
withoutAllKeys
public MutableObjectCharMap<K> withoutAllKeys(Iterable<? extends K> keys)
- Specified by:
withoutAllKeys
in interfaceMutableObjectCharMap<K>
-
asUnmodifiable
public MutableObjectCharMap<K> asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableObjectCharMap<K>
-
asSynchronized
public MutableObjectCharMap<K> asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableObjectCharMap<K>
-
toImmutable
public ImmutableObjectCharMap<K> toImmutable()
- Specified by:
toImmutable
in interfaceObjectCharMap<K>
-
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 Set<K> keySet()
- Specified by:
keySet
in interfaceObjectCharMap<K>
-
values
public MutableCharCollection values()
- Specified by:
values
in interfaceObjectCharMap<K>
-
keysView
public LazyIterable<K> keysView()
- Specified by:
keysView
in interfaceObjectCharMap<K>
-
keyValuesView
public RichIterable<ObjectCharPair<K>> keyValuesView()
- Specified by:
keyValuesView
in interfaceObjectCharMap<K>
-
flipUniqueValues
public MutableCharObjectMap<K> flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceMutableObjectCharMap<K>
- Specified by:
flipUniqueValues
in interfaceObjectCharMap<K>
-
toString
public String toString()
- Specified by:
toString
in interfaceObjectCharMap<K>
- 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, ObjectCharToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceCharIterable
-
chunk
public RichIterable<CharIterable> chunk(int size)
- Specified by:
chunk
in interfaceCharIterable
-
-