Class SynchronizedByteCharMap
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.SynchronizedByteCharMap
-
- All Implemented Interfaces:
Serializable
,CharIterable
,ByteCharMap
,CharValuesMap
,MutableByteCharMap
,MutableCharValuesMap
,PrimitiveIterable
public class SynchronizedByteCharMap extends Object implements MutableByteCharMap, Serializable
A synchronized view of aMutableByteCharMap
. It is imperative that the user manually synchronize on the collection when iterating over it using theMutableCharIterator
as perCollections.synchronizedCollection(Collection)
.This file was automatically generated from template file synchronizedPrimitivePrimitiveMap.stg.
- Since:
- 3.1.
- See Also:
MutableByteCharMap.asSynchronized()
,MutableMap.asSynchronized()
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedByteCharMap(MutableByteCharMap map)
SynchronizedByteCharMap(MutableByteCharMap map, Object newLock)
-
Method Summary
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ByteCharMap
injectIntoKeyValue
-
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.CharValuesMap
tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableByteCharMap
withAllKeyValues
-
-
-
-
Constructor Detail
-
SynchronizedByteCharMap
public SynchronizedByteCharMap(MutableByteCharMap map)
-
SynchronizedByteCharMap
public SynchronizedByteCharMap(MutableByteCharMap map, Object newLock)
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableCharValuesMap
-
put
public void put(byte key, char value)
- Specified by:
put
in interfaceMutableByteCharMap
-
putPair
public void putPair(ByteCharPair keyValuePair)
- Specified by:
putPair
in interfaceMutableByteCharMap
-
putAll
public void putAll(ByteCharMap map)
- Specified by:
putAll
in interfaceMutableByteCharMap
-
updateValues
public void updateValues(ByteCharToCharFunction function)
- Specified by:
updateValues
in interfaceMutableByteCharMap
-
removeKey
public void removeKey(byte key)
- Specified by:
removeKey
in interfaceMutableByteCharMap
-
remove
public void remove(byte key)
- Specified by:
remove
in interfaceMutableByteCharMap
-
removeKeyIfAbsent
public char removeKeyIfAbsent(byte key, char value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableByteCharMap
-
getIfAbsentPut
public char getIfAbsentPut(byte key, char value)
- Specified by:
getIfAbsentPut
in interfaceMutableByteCharMap
-
getAndPut
public char getAndPut(byte key, char putValue, char defaultValue)
- Specified by:
getAndPut
in interfaceMutableByteCharMap
-
getIfAbsentPut
public char getIfAbsentPut(byte key, CharFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableByteCharMap
-
getIfAbsentPutWithKey
public char getIfAbsentPutWithKey(byte key, ByteToCharFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableByteCharMap
-
getIfAbsentPutWith
public <P> char getIfAbsentPutWith(byte key, CharFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableByteCharMap
-
updateValue
public char updateValue(byte key, char initialValueIfAbsent, CharToCharFunction function)
- Specified by:
updateValue
in interfaceMutableByteCharMap
-
get
public char get(byte key)
- Specified by:
get
in interfaceByteCharMap
-
getIfAbsent
public char getIfAbsent(byte key, char ifAbsent)
- Specified by:
getIfAbsent
in interfaceByteCharMap
-
getOrThrow
public char getOrThrow(byte key)
- Specified by:
getOrThrow
in interfaceByteCharMap
-
containsKey
public boolean containsKey(byte key)
- Specified by:
containsKey
in interfaceByteCharMap
-
containsValue
public boolean containsValue(char value)
- Specified by:
containsValue
in interfaceCharValuesMap
-
forEachValue
public void forEachValue(CharProcedure procedure)
- Specified by:
forEachValue
in interfaceCharValuesMap
-
forEachKey
public void forEachKey(ByteProcedure procedure)
- Specified by:
forEachKey
in interfaceByteCharMap
-
forEachKeyValue
public void forEachKeyValue(ByteCharProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceByteCharMap
-
keysView
public LazyByteIterable keysView()
- Specified by:
keysView
in interfaceByteCharMap
-
keyValuesView
public RichIterable<ByteCharPair> keyValuesView()
- Specified by:
keyValuesView
in interfaceByteCharMap
-
flipUniqueValues
public MutableCharByteMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceByteCharMap
- Specified by:
flipUniqueValues
in interfaceMutableByteCharMap
-
select
public MutableByteCharMap select(ByteCharPredicate predicate)
- Specified by:
select
in interfaceByteCharMap
- Specified by:
select
in interfaceMutableByteCharMap
-
reject
public MutableByteCharMap reject(ByteCharPredicate predicate)
- Specified by:
reject
in interfaceByteCharMap
- Specified by:
reject
in interfaceMutableByteCharMap
-
charIterator
public MutableCharIterator charIterator()
This must be manually synchronized by the developer.- Specified by:
charIterator
in interfaceCharIterable
- Specified by:
charIterator
in interfaceMutableCharValuesMap
-
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 MutableCharBag select(CharPredicate predicate)
- Specified by:
select
in interfaceCharIterable
- Specified by:
select
in interfaceCharValuesMap
- Specified by:
select
in interfaceMutableCharValuesMap
-
reject
public MutableCharBag reject(CharPredicate predicate)
- Specified by:
reject
in interfaceCharIterable
- Specified by:
reject
in interfaceCharValuesMap
- Specified by:
reject
in interfaceMutableCharValuesMap
-
collect
public <V> MutableBag<V> collect(CharToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceCharIterable
- Specified by:
collect
in interfaceCharValuesMap
- Specified by:
collect
in interfaceMutableCharValuesMap
-
detectIfNone
public char detectIfNone(CharPredicate predicate, char ifNone)
- Specified by:
detectIfNone
in interfaceCharIterable
-
sum
public long sum()
- Specified by:
sum
in interfaceCharIterable
-
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
-
addToValue
public char addToValue(byte key, char toBeAdded)
- Specified by:
addToValue
in interfaceMutableByteCharMap
-
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 MutableByteCharMap withKeyValue(byte key, char value)
- Specified by:
withKeyValue
in interfaceMutableByteCharMap
-
withoutKey
public MutableByteCharMap withoutKey(byte key)
- Specified by:
withoutKey
in interfaceMutableByteCharMap
-
withoutAllKeys
public MutableByteCharMap withoutAllKeys(ByteIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableByteCharMap
-
asUnmodifiable
public MutableByteCharMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableByteCharMap
-
asSynchronized
public MutableByteCharMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableByteCharMap
-
toImmutable
public ImmutableByteCharMap toImmutable()
- Specified by:
toImmutable
in interfaceByteCharMap
-
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 MutableByteSet keySet()
- Specified by:
keySet
in interfaceByteCharMap
-
values
public MutableCharCollection values()
- Specified by:
values
in interfaceCharValuesMap
-
equals
public boolean equals(Object otherMap)
- Specified by:
equals
in interfaceByteCharMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceByteCharMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfaceByteCharMap
- 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
-
-