Class SynchronizedByteIntMap
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.SynchronizedByteIntMap
-
- All Implemented Interfaces:
Serializable
,IntIterable
,ByteIntMap
,IntValuesMap
,MutableByteIntMap
,MutableIntValuesMap
,PrimitiveIterable
public class SynchronizedByteIntMap extends Object implements MutableByteIntMap, Serializable
A synchronized view of aMutableByteIntMap
. It is imperative that the user manually synchronize on the collection when iterating over it using theMutableIntIterator
as perCollections.synchronizedCollection(Collection)
.This file was automatically generated from template file synchronizedPrimitivePrimitiveMap.stg.
- Since:
- 3.1.
- See Also:
MutableByteIntMap.asSynchronized()
,MutableMap.asSynchronized()
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedByteIntMap(MutableByteIntMap map)
SynchronizedByteIntMap(MutableByteIntMap map, Object newLock)
-
Method Summary
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ByteIntMap
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.MutableByteIntMap
withAllKeyValues
-
-
-
-
Constructor Detail
-
SynchronizedByteIntMap
public SynchronizedByteIntMap(MutableByteIntMap map)
-
SynchronizedByteIntMap
public SynchronizedByteIntMap(MutableByteIntMap map, Object newLock)
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableIntValuesMap
-
put
public void put(byte key, int value)
- Specified by:
put
in interfaceMutableByteIntMap
-
putPair
public void putPair(ByteIntPair keyValuePair)
- Specified by:
putPair
in interfaceMutableByteIntMap
-
putAll
public void putAll(ByteIntMap map)
- Specified by:
putAll
in interfaceMutableByteIntMap
-
updateValues
public void updateValues(ByteIntToIntFunction function)
- Specified by:
updateValues
in interfaceMutableByteIntMap
-
removeKey
public void removeKey(byte key)
- Specified by:
removeKey
in interfaceMutableByteIntMap
-
remove
public void remove(byte key)
- Specified by:
remove
in interfaceMutableByteIntMap
-
removeKeyIfAbsent
public int removeKeyIfAbsent(byte key, int value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableByteIntMap
-
getIfAbsentPut
public int getIfAbsentPut(byte key, int value)
- Specified by:
getIfAbsentPut
in interfaceMutableByteIntMap
-
getAndPut
public int getAndPut(byte key, int putValue, int defaultValue)
- Specified by:
getAndPut
in interfaceMutableByteIntMap
-
getIfAbsentPut
public int getIfAbsentPut(byte key, IntFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableByteIntMap
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(byte key, ByteToIntFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableByteIntMap
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(byte key, IntFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableByteIntMap
-
updateValue
public int updateValue(byte key, int initialValueIfAbsent, IntToIntFunction function)
- Specified by:
updateValue
in interfaceMutableByteIntMap
-
get
public int get(byte key)
- Specified by:
get
in interfaceByteIntMap
-
getIfAbsent
public int getIfAbsent(byte key, int ifAbsent)
- Specified by:
getIfAbsent
in interfaceByteIntMap
-
getOrThrow
public int getOrThrow(byte key)
- Specified by:
getOrThrow
in interfaceByteIntMap
-
containsKey
public boolean containsKey(byte key)
- Specified by:
containsKey
in interfaceByteIntMap
-
containsValue
public boolean containsValue(int value)
- Specified by:
containsValue
in interfaceIntValuesMap
-
forEachValue
public void forEachValue(IntProcedure procedure)
- Specified by:
forEachValue
in interfaceIntValuesMap
-
forEachKey
public void forEachKey(ByteProcedure procedure)
- Specified by:
forEachKey
in interfaceByteIntMap
-
forEachKeyValue
public void forEachKeyValue(ByteIntProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceByteIntMap
-
keysView
public LazyByteIterable keysView()
- Specified by:
keysView
in interfaceByteIntMap
-
keyValuesView
public RichIterable<ByteIntPair> keyValuesView()
- Specified by:
keyValuesView
in interfaceByteIntMap
-
flipUniqueValues
public MutableIntByteMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceByteIntMap
- Specified by:
flipUniqueValues
in interfaceMutableByteIntMap
-
select
public MutableByteIntMap select(ByteIntPredicate predicate)
- Specified by:
select
in interfaceByteIntMap
- Specified by:
select
in interfaceMutableByteIntMap
-
reject
public MutableByteIntMap reject(ByteIntPredicate predicate)
- Specified by:
reject
in interfaceByteIntMap
- Specified by:
reject
in interfaceMutableByteIntMap
-
intIterator
public MutableIntIterator intIterator()
This must be manually synchronized by the developer.- Specified by:
intIterator
in interfaceIntIterable
- Specified by:
intIterator
in interfaceMutableIntValuesMap
-
each
public void each(IntProcedure procedure)
- Specified by:
each
in interfaceIntIterable
- Since:
- 7.0.
-
count
public int count(IntPredicate predicate)
- Specified by:
count
in interfaceIntIterable
-
anySatisfy
public boolean anySatisfy(IntPredicate predicate)
- Specified by:
anySatisfy
in interfaceIntIterable
-
allSatisfy
public boolean allSatisfy(IntPredicate predicate)
- Specified by:
allSatisfy
in interfaceIntIterable
-
noneSatisfy
public boolean noneSatisfy(IntPredicate predicate)
- Specified by:
noneSatisfy
in interfaceIntIterable
-
select
public MutableIntBag select(IntPredicate predicate)
- Specified by:
select
in interfaceIntIterable
- Specified by:
select
in interfaceIntValuesMap
- Specified by:
select
in interfaceMutableIntValuesMap
-
reject
public MutableIntBag reject(IntPredicate predicate)
- Specified by:
reject
in interfaceIntIterable
- Specified by:
reject
in interfaceIntValuesMap
- Specified by:
reject
in interfaceMutableIntValuesMap
-
collect
public <V> MutableBag<V> collect(IntToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceIntIterable
- Specified by:
collect
in interfaceIntValuesMap
- Specified by:
collect
in interfaceMutableIntValuesMap
-
detectIfNone
public int detectIfNone(IntPredicate predicate, int ifNone)
- Specified by:
detectIfNone
in interfaceIntIterable
-
sum
public long sum()
- Specified by:
sum
in interfaceIntIterable
-
max
public int max()
- Specified by:
max
in interfaceIntIterable
-
maxIfEmpty
public int maxIfEmpty(int defaultValue)
- Specified by:
maxIfEmpty
in interfaceIntIterable
-
min
public int min()
- Specified by:
min
in interfaceIntIterable
-
minIfEmpty
public int minIfEmpty(int defaultValue)
- Specified by:
minIfEmpty
in interfaceIntIterable
-
average
public double average()
- Specified by:
average
in interfaceIntIterable
-
median
public double median()
- Specified by:
median
in interfaceIntIterable
-
addToValue
public int addToValue(byte key, int toBeAdded)
- Specified by:
addToValue
in interfaceMutableByteIntMap
-
toSortedArray
public int[] toSortedArray()
- Specified by:
toSortedArray
in interfaceIntIterable
-
toSortedList
public MutableIntList toSortedList()
- Specified by:
toSortedList
in interfaceIntIterable
-
toArray
public int[] toArray()
- Specified by:
toArray
in interfaceIntIterable
-
toArray
public int[] toArray(int[] target)
- Specified by:
toArray
in interfaceIntIterable
-
contains
public boolean contains(int value)
- Specified by:
contains
in interfaceIntIterable
-
containsAll
public boolean containsAll(int... source)
- Specified by:
containsAll
in interfaceIntIterable
-
containsAll
public boolean containsAll(IntIterable source)
- Specified by:
containsAll
in interfaceIntIterable
-
toList
public MutableIntList toList()
- Specified by:
toList
in interfaceIntIterable
-
toSet
public MutableIntSet toSet()
- Specified by:
toSet
in interfaceIntIterable
-
toBag
public MutableIntBag toBag()
- Specified by:
toBag
in interfaceIntIterable
-
asLazy
public LazyIntIterable asLazy()
- Specified by:
asLazy
in interfaceIntIterable
-
withKeyValue
public MutableByteIntMap withKeyValue(byte key, int value)
- Specified by:
withKeyValue
in interfaceMutableByteIntMap
-
withoutKey
public MutableByteIntMap withoutKey(byte key)
- Specified by:
withoutKey
in interfaceMutableByteIntMap
-
withoutAllKeys
public MutableByteIntMap withoutAllKeys(ByteIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableByteIntMap
-
asUnmodifiable
public MutableByteIntMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableByteIntMap
-
asSynchronized
public MutableByteIntMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableByteIntMap
-
toImmutable
public ImmutableByteIntMap toImmutable()
- Specified by:
toImmutable
in interfaceByteIntMap
-
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 interfaceByteIntMap
-
values
public MutableIntCollection values()
- Specified by:
values
in interfaceIntValuesMap
-
equals
public boolean equals(Object otherMap)
- Specified by:
equals
in interfaceByteIntMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceByteIntMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfaceByteIntMap
- 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, ObjectIntToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceIntIterable
-
chunk
public RichIterable<IntIterable> chunk(int size)
- Specified by:
chunk
in interfaceIntIterable
-
-