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:
clearin interfaceMutableObjectCharMap<K>
-
put
public void put(K key, char value)
- Specified by:
putin interfaceMutableObjectCharMap<K>
-
putPair
public void putPair(ObjectCharPair<K> keyValuePair)
- Specified by:
putPairin interfaceMutableObjectCharMap<K>
-
putAll
public void putAll(ObjectCharMap<? extends K> map)
- Specified by:
putAllin interfaceMutableObjectCharMap<K>
-
updateValues
public void updateValues(ObjectCharToCharFunction<? super K> function)
- Specified by:
updateValuesin interfaceMutableObjectCharMap<K>
-
removeKey
public void removeKey(K key)
- Specified by:
removeKeyin interfaceMutableObjectCharMap<K>
-
remove
public void remove(Object key)
- Specified by:
removein interfaceMutableObjectCharMap<K>
-
removeKeyIfAbsent
public char removeKeyIfAbsent(K key, char value)
- Specified by:
removeKeyIfAbsentin interfaceMutableObjectCharMap<K>
-
getIfAbsentPut
public char getIfAbsentPut(K key, char value)
- Specified by:
getIfAbsentPutin interfaceMutableObjectCharMap<K>
-
getAndPut
public char getAndPut(K key, char putValue, char defaultValue)
- Specified by:
getAndPutin interfaceMutableObjectCharMap<K>
-
getIfAbsentPut
public char getIfAbsentPut(K key, CharFunction0 function)
- Specified by:
getIfAbsentPutin interfaceMutableObjectCharMap<K>
-
getIfAbsentPutWithKey
public char getIfAbsentPutWithKey(K key, CharFunction<? super K> function)
- Specified by:
getIfAbsentPutWithKeyin interfaceMutableObjectCharMap<K>
-
getIfAbsentPutWith
public <P> char getIfAbsentPutWith(K key, CharFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWithin interfaceMutableObjectCharMap<K>
-
updateValue
public char updateValue(K key, char initialValueIfAbsent, CharToCharFunction function)
- Specified by:
updateValuein interfaceMutableObjectCharMap<K>
-
get
public char get(Object key)
- Specified by:
getin interfaceObjectCharMap<K>
-
getOrThrow
public char getOrThrow(Object key)
- Specified by:
getOrThrowin interfaceObjectCharMap<K>
-
getIfAbsent
public char getIfAbsent(Object key, char ifAbsent)
- Specified by:
getIfAbsentin interfaceObjectCharMap<K>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceObjectCharMap<K>
-
containsValue
public boolean containsValue(char value)
- Specified by:
containsValuein interfaceObjectCharMap<K>
-
forEachValue
public void forEachValue(CharProcedure procedure)
- Specified by:
forEachValuein interfaceObjectCharMap<K>
-
forEachKey
public void forEachKey(Procedure<? super K> procedure)
- Specified by:
forEachKeyin interfaceObjectCharMap<K>
-
forEachKeyValue
public void forEachKeyValue(ObjectCharProcedure<? super K> procedure)
- Specified by:
forEachKeyValuein interfaceObjectCharMap<K>
-
select
public MutableObjectCharMap<K> select(ObjectCharPredicate<? super K> predicate)
- Specified by:
selectin interfaceMutableObjectCharMap<K>- Specified by:
selectin interfaceObjectCharMap<K>
-
reject
public MutableObjectCharMap<K> reject(ObjectCharPredicate<? super K> predicate)
- Specified by:
rejectin interfaceMutableObjectCharMap<K>- Specified by:
rejectin interfaceObjectCharMap<K>
-
charIterator
public MutableCharIterator charIterator()
Must be called in a synchronized block.- Specified by:
charIteratorin interfaceCharIterable- Specified by:
charIteratorin interfaceMutableObjectCharMap<K>
-
each
public void each(CharProcedure procedure)
- Specified by:
eachin interfaceCharIterable- Since:
- 7.0.
-
count
public int count(CharPredicate predicate)
- Specified by:
countin interfaceCharIterable
-
anySatisfy
public boolean anySatisfy(CharPredicate predicate)
- Specified by:
anySatisfyin interfaceCharIterable
-
allSatisfy
public boolean allSatisfy(CharPredicate predicate)
- Specified by:
allSatisfyin interfaceCharIterable
-
noneSatisfy
public boolean noneSatisfy(CharPredicate predicate)
- Specified by:
noneSatisfyin interfaceCharIterable
-
select
public MutableCharCollection select(CharPredicate predicate)
- Specified by:
selectin interfaceCharIterable- Specified by:
selectin interfaceMutableObjectCharMap<K>
-
reject
public MutableCharCollection reject(CharPredicate predicate)
- Specified by:
rejectin interfaceCharIterable- Specified by:
rejectin interfaceMutableObjectCharMap<K>
-
detectIfNone
public char detectIfNone(CharPredicate predicate, char ifNone)
- Specified by:
detectIfNonein interfaceCharIterable
-
collect
public <V1> MutableCollection<V1> collect(CharToObjectFunction<? extends V1> function)
- Specified by:
collectin interfaceCharIterable- Specified by:
collectin interfaceMutableObjectCharMap<K>
-
sum
public long sum()
- Specified by:
sumin interfaceCharIterable
-
addToValue
public char addToValue(K key, char toBeAdded)
- Specified by:
addToValuein interfaceMutableObjectCharMap<K>
-
max
public char max()
- Specified by:
maxin interfaceCharIterable
-
maxIfEmpty
public char maxIfEmpty(char defaultValue)
- Specified by:
maxIfEmptyin interfaceCharIterable
-
min
public char min()
- Specified by:
minin interfaceCharIterable
-
minIfEmpty
public char minIfEmpty(char defaultValue)
- Specified by:
minIfEmptyin interfaceCharIterable
-
average
public double average()
- Specified by:
averagein interfaceCharIterable
-
median
public double median()
- Specified by:
medianin interfaceCharIterable
-
toSortedArray
public char[] toSortedArray()
- Specified by:
toSortedArrayin interfaceCharIterable
-
toSortedList
public MutableCharList toSortedList()
- Specified by:
toSortedListin interfaceCharIterable
-
toArray
public char[] toArray()
- Specified by:
toArrayin interfaceCharIterable
-
toArray
public char[] toArray(char[] target)
- Specified by:
toArrayin interfaceCharIterable
-
contains
public boolean contains(char value)
- Specified by:
containsin interfaceCharIterable
-
containsAll
public boolean containsAll(char... source)
- Specified by:
containsAllin interfaceCharIterable
-
containsAll
public boolean containsAll(CharIterable source)
- Specified by:
containsAllin interfaceCharIterable
-
toList
public MutableCharList toList()
- Specified by:
toListin interfaceCharIterable
-
toSet
public MutableCharSet toSet()
- Specified by:
toSetin interfaceCharIterable
-
toBag
public MutableCharBag toBag()
- Specified by:
toBagin interfaceCharIterable
-
asLazy
public LazyCharIterable asLazy()
- Specified by:
asLazyin interfaceCharIterable
-
withKeyValue
public MutableObjectCharMap<K> withKeyValue(K key, char value)
- Specified by:
withKeyValuein interfaceMutableObjectCharMap<K>
-
withoutKey
public MutableObjectCharMap<K> withoutKey(K key)
- Specified by:
withoutKeyin interfaceMutableObjectCharMap<K>
-
withoutAllKeys
public MutableObjectCharMap<K> withoutAllKeys(Iterable<? extends K> keys)
- Specified by:
withoutAllKeysin interfaceMutableObjectCharMap<K>
-
asUnmodifiable
public MutableObjectCharMap<K> asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableObjectCharMap<K>
-
asSynchronized
public MutableObjectCharMap<K> asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableObjectCharMap<K>
-
toImmutable
public ImmutableObjectCharMap<K> toImmutable()
- Specified by:
toImmutablein interfaceObjectCharMap<K>
-
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 Set<K> keySet()
- Specified by:
keySetin interfaceObjectCharMap<K>
-
values
public MutableCharCollection values()
- Specified by:
valuesin interfaceObjectCharMap<K>
-
keysView
public LazyIterable<K> keysView()
- Specified by:
keysViewin interfaceObjectCharMap<K>
-
keyValuesView
public RichIterable<ObjectCharPair<K>> keyValuesView()
- Specified by:
keyValuesViewin interfaceObjectCharMap<K>
-
flipUniqueValues
public MutableCharObjectMap<K> flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceMutableObjectCharMap<K>- Specified by:
flipUniqueValuesin interfaceObjectCharMap<K>
-
toString
public String toString()
- Specified by:
toStringin interfaceObjectCharMap<K>- 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, ObjectCharToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin interfaceCharIterable
-
chunk
public RichIterable<CharIterable> chunk(int size)
- Specified by:
chunkin interfaceCharIterable
-
-