Class SynchronizedByteByteMap
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.SynchronizedByteByteMap
-
- All Implemented Interfaces:
Serializable
,ByteIterable
,ByteByteMap
,ByteValuesMap
,MutableByteByteMap
,MutableByteValuesMap
,PrimitiveIterable
public class SynchronizedByteByteMap extends Object implements MutableByteByteMap, Serializable
A synchronized view of aMutableByteByteMap
. It is imperative that the user manually synchronize on the collection when iterating over it using theMutableByteIterator
as perCollections.synchronizedCollection(Collection)
.This file was automatically generated from template file synchronizedPrimitivePrimitiveMap.stg.
- Since:
- 3.1.
- See Also:
MutableByteByteMap.asSynchronized()
,MutableMap.asSynchronized()
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedByteByteMap(MutableByteByteMap map)
SynchronizedByteByteMap(MutableByteByteMap map, Object newLock)
-
Method Summary
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ByteByteMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.api.ByteIterable
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.ByteValuesMap
tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableByteByteMap
withAllKeyValues
-
-
-
-
Constructor Detail
-
SynchronizedByteByteMap
public SynchronizedByteByteMap(MutableByteByteMap map)
-
SynchronizedByteByteMap
public SynchronizedByteByteMap(MutableByteByteMap map, Object newLock)
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableByteValuesMap
-
put
public void put(byte key, byte value)
- Specified by:
put
in interfaceMutableByteByteMap
-
putPair
public void putPair(ByteBytePair keyValuePair)
- Specified by:
putPair
in interfaceMutableByteByteMap
-
putAll
public void putAll(ByteByteMap map)
- Specified by:
putAll
in interfaceMutableByteByteMap
-
updateValues
public void updateValues(ByteByteToByteFunction function)
- Specified by:
updateValues
in interfaceMutableByteByteMap
-
removeKey
public void removeKey(byte key)
- Specified by:
removeKey
in interfaceMutableByteByteMap
-
remove
public void remove(byte key)
- Specified by:
remove
in interfaceMutableByteByteMap
-
removeKeyIfAbsent
public byte removeKeyIfAbsent(byte key, byte value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableByteByteMap
-
getIfAbsentPut
public byte getIfAbsentPut(byte key, byte value)
- Specified by:
getIfAbsentPut
in interfaceMutableByteByteMap
-
getAndPut
public byte getAndPut(byte key, byte putValue, byte defaultValue)
- Specified by:
getAndPut
in interfaceMutableByteByteMap
-
getIfAbsentPut
public byte getIfAbsentPut(byte key, ByteFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableByteByteMap
-
getIfAbsentPutWithKey
public byte getIfAbsentPutWithKey(byte key, ByteToByteFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableByteByteMap
-
getIfAbsentPutWith
public <P> byte getIfAbsentPutWith(byte key, ByteFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableByteByteMap
-
updateValue
public byte updateValue(byte key, byte initialValueIfAbsent, ByteToByteFunction function)
- Specified by:
updateValue
in interfaceMutableByteByteMap
-
get
public byte get(byte key)
- Specified by:
get
in interfaceByteByteMap
-
getIfAbsent
public byte getIfAbsent(byte key, byte ifAbsent)
- Specified by:
getIfAbsent
in interfaceByteByteMap
-
getOrThrow
public byte getOrThrow(byte key)
- Specified by:
getOrThrow
in interfaceByteByteMap
-
containsKey
public boolean containsKey(byte key)
- Specified by:
containsKey
in interfaceByteByteMap
-
containsValue
public boolean containsValue(byte value)
- Specified by:
containsValue
in interfaceByteValuesMap
-
forEachValue
public void forEachValue(ByteProcedure procedure)
- Specified by:
forEachValue
in interfaceByteValuesMap
-
forEachKey
public void forEachKey(ByteProcedure procedure)
- Specified by:
forEachKey
in interfaceByteByteMap
-
forEachKeyValue
public void forEachKeyValue(ByteByteProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceByteByteMap
-
keysView
public LazyByteIterable keysView()
- Specified by:
keysView
in interfaceByteByteMap
-
keyValuesView
public RichIterable<ByteBytePair> keyValuesView()
- Specified by:
keyValuesView
in interfaceByteByteMap
-
flipUniqueValues
public MutableByteByteMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceByteByteMap
- Specified by:
flipUniqueValues
in interfaceMutableByteByteMap
-
select
public MutableByteByteMap select(ByteBytePredicate predicate)
- Specified by:
select
in interfaceByteByteMap
- Specified by:
select
in interfaceMutableByteByteMap
-
reject
public MutableByteByteMap reject(ByteBytePredicate predicate)
- Specified by:
reject
in interfaceByteByteMap
- Specified by:
reject
in interfaceMutableByteByteMap
-
byteIterator
public MutableByteIterator byteIterator()
This must be manually synchronized by the developer.- Specified by:
byteIterator
in interfaceByteIterable
- Specified by:
byteIterator
in interfaceMutableByteValuesMap
-
each
public void each(ByteProcedure procedure)
- Specified by:
each
in interfaceByteIterable
- Since:
- 7.0.
-
count
public int count(BytePredicate predicate)
- Specified by:
count
in interfaceByteIterable
-
anySatisfy
public boolean anySatisfy(BytePredicate predicate)
- Specified by:
anySatisfy
in interfaceByteIterable
-
allSatisfy
public boolean allSatisfy(BytePredicate predicate)
- Specified by:
allSatisfy
in interfaceByteIterable
-
noneSatisfy
public boolean noneSatisfy(BytePredicate predicate)
- Specified by:
noneSatisfy
in interfaceByteIterable
-
select
public MutableByteBag select(BytePredicate predicate)
- Specified by:
select
in interfaceByteIterable
- Specified by:
select
in interfaceByteValuesMap
- Specified by:
select
in interfaceMutableByteValuesMap
-
reject
public MutableByteBag reject(BytePredicate predicate)
- Specified by:
reject
in interfaceByteIterable
- Specified by:
reject
in interfaceByteValuesMap
- Specified by:
reject
in interfaceMutableByteValuesMap
-
collect
public <V> MutableBag<V> collect(ByteToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceByteIterable
- Specified by:
collect
in interfaceByteValuesMap
- Specified by:
collect
in interfaceMutableByteValuesMap
-
detectIfNone
public byte detectIfNone(BytePredicate predicate, byte ifNone)
- Specified by:
detectIfNone
in interfaceByteIterable
-
sum
public long sum()
- Specified by:
sum
in interfaceByteIterable
-
max
public byte max()
- Specified by:
max
in interfaceByteIterable
-
maxIfEmpty
public byte maxIfEmpty(byte defaultValue)
- Specified by:
maxIfEmpty
in interfaceByteIterable
-
min
public byte min()
- Specified by:
min
in interfaceByteIterable
-
minIfEmpty
public byte minIfEmpty(byte defaultValue)
- Specified by:
minIfEmpty
in interfaceByteIterable
-
average
public double average()
- Specified by:
average
in interfaceByteIterable
-
median
public double median()
- Specified by:
median
in interfaceByteIterable
-
addToValue
public byte addToValue(byte key, byte toBeAdded)
- Specified by:
addToValue
in interfaceMutableByteByteMap
-
toSortedArray
public byte[] toSortedArray()
- Specified by:
toSortedArray
in interfaceByteIterable
-
toSortedList
public MutableByteList toSortedList()
- Specified by:
toSortedList
in interfaceByteIterable
-
toArray
public byte[] toArray()
- Specified by:
toArray
in interfaceByteIterable
-
toArray
public byte[] toArray(byte[] target)
- Specified by:
toArray
in interfaceByteIterable
-
contains
public boolean contains(byte value)
- Specified by:
contains
in interfaceByteIterable
-
containsAll
public boolean containsAll(byte... source)
- Specified by:
containsAll
in interfaceByteIterable
-
containsAll
public boolean containsAll(ByteIterable source)
- Specified by:
containsAll
in interfaceByteIterable
-
toList
public MutableByteList toList()
- Specified by:
toList
in interfaceByteIterable
-
toSet
public MutableByteSet toSet()
- Specified by:
toSet
in interfaceByteIterable
-
toBag
public MutableByteBag toBag()
- Specified by:
toBag
in interfaceByteIterable
-
asLazy
public LazyByteIterable asLazy()
- Specified by:
asLazy
in interfaceByteIterable
-
withKeyValue
public MutableByteByteMap withKeyValue(byte key, byte value)
- Specified by:
withKeyValue
in interfaceMutableByteByteMap
-
withoutKey
public MutableByteByteMap withoutKey(byte key)
- Specified by:
withoutKey
in interfaceMutableByteByteMap
-
withoutAllKeys
public MutableByteByteMap withoutAllKeys(ByteIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableByteByteMap
-
asUnmodifiable
public MutableByteByteMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableByteByteMap
-
asSynchronized
public MutableByteByteMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableByteByteMap
-
toImmutable
public ImmutableByteByteMap toImmutable()
- Specified by:
toImmutable
in interfaceByteByteMap
-
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 interfaceByteByteMap
-
values
public MutableByteCollection values()
- Specified by:
values
in interfaceByteValuesMap
-
equals
public boolean equals(Object otherMap)
- Specified by:
equals
in interfaceByteByteMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceByteByteMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfaceByteByteMap
- 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, ObjectByteToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceByteIterable
-
chunk
public RichIterable<ByteIterable> chunk(int size)
- Specified by:
chunk
in interfaceByteIterable
-
-