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 theMutableIntIteratoras 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:
clearin interfaceMutableIntValuesMap
-
put
public void put(byte key, int value)- Specified by:
putin interfaceMutableByteIntMap
-
putPair
public void putPair(ByteIntPair keyValuePair)
- Specified by:
putPairin interfaceMutableByteIntMap
-
putAll
public void putAll(ByteIntMap map)
- Specified by:
putAllin interfaceMutableByteIntMap
-
updateValues
public void updateValues(ByteIntToIntFunction function)
- Specified by:
updateValuesin interfaceMutableByteIntMap
-
removeKey
public void removeKey(byte key)
- Specified by:
removeKeyin interfaceMutableByteIntMap
-
remove
public void remove(byte key)
- Specified by:
removein interfaceMutableByteIntMap
-
removeKeyIfAbsent
public int removeKeyIfAbsent(byte key, int value)- Specified by:
removeKeyIfAbsentin interfaceMutableByteIntMap
-
getIfAbsentPut
public int getIfAbsentPut(byte key, int value)- Specified by:
getIfAbsentPutin interfaceMutableByteIntMap
-
getAndPut
public int getAndPut(byte key, int putValue, int defaultValue)- Specified by:
getAndPutin interfaceMutableByteIntMap
-
getIfAbsentPut
public int getIfAbsentPut(byte key, IntFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableByteIntMap
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(byte key, ByteToIntFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableByteIntMap
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(byte key, IntFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableByteIntMap
-
updateValue
public int updateValue(byte key, int initialValueIfAbsent, IntToIntFunction function)- Specified by:
updateValuein interfaceMutableByteIntMap
-
get
public int get(byte key)
- Specified by:
getin interfaceByteIntMap
-
getIfAbsent
public int getIfAbsent(byte key, int ifAbsent)- Specified by:
getIfAbsentin interfaceByteIntMap
-
getOrThrow
public int getOrThrow(byte key)
- Specified by:
getOrThrowin interfaceByteIntMap
-
containsKey
public boolean containsKey(byte key)
- Specified by:
containsKeyin interfaceByteIntMap
-
containsValue
public boolean containsValue(int value)
- Specified by:
containsValuein interfaceIntValuesMap
-
forEachValue
public void forEachValue(IntProcedure procedure)
- Specified by:
forEachValuein interfaceIntValuesMap
-
forEachKey
public void forEachKey(ByteProcedure procedure)
- Specified by:
forEachKeyin interfaceByteIntMap
-
forEachKeyValue
public void forEachKeyValue(ByteIntProcedure procedure)
- Specified by:
forEachKeyValuein interfaceByteIntMap
-
keysView
public LazyByteIterable keysView()
- Specified by:
keysViewin interfaceByteIntMap
-
keyValuesView
public RichIterable<ByteIntPair> keyValuesView()
- Specified by:
keyValuesViewin interfaceByteIntMap
-
flipUniqueValues
public MutableIntByteMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceByteIntMap- Specified by:
flipUniqueValuesin interfaceMutableByteIntMap
-
select
public MutableByteIntMap select(ByteIntPredicate predicate)
- Specified by:
selectin interfaceByteIntMap- Specified by:
selectin interfaceMutableByteIntMap
-
reject
public MutableByteIntMap reject(ByteIntPredicate predicate)
- Specified by:
rejectin interfaceByteIntMap- Specified by:
rejectin interfaceMutableByteIntMap
-
intIterator
public MutableIntIterator intIterator()
This must be manually synchronized by the developer.- Specified by:
intIteratorin interfaceIntIterable- Specified by:
intIteratorin interfaceMutableIntValuesMap
-
each
public void each(IntProcedure procedure)
- Specified by:
eachin interfaceIntIterable- Since:
- 7.0.
-
count
public int count(IntPredicate predicate)
- Specified by:
countin interfaceIntIterable
-
anySatisfy
public boolean anySatisfy(IntPredicate predicate)
- Specified by:
anySatisfyin interfaceIntIterable
-
allSatisfy
public boolean allSatisfy(IntPredicate predicate)
- Specified by:
allSatisfyin interfaceIntIterable
-
noneSatisfy
public boolean noneSatisfy(IntPredicate predicate)
- Specified by:
noneSatisfyin interfaceIntIterable
-
select
public MutableIntBag select(IntPredicate predicate)
- Specified by:
selectin interfaceIntIterable- Specified by:
selectin interfaceIntValuesMap- Specified by:
selectin interfaceMutableIntValuesMap
-
reject
public MutableIntBag reject(IntPredicate predicate)
- Specified by:
rejectin interfaceIntIterable- Specified by:
rejectin interfaceIntValuesMap- Specified by:
rejectin interfaceMutableIntValuesMap
-
collect
public <V> MutableBag<V> collect(IntToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceIntIterable- Specified by:
collectin interfaceIntValuesMap- Specified by:
collectin interfaceMutableIntValuesMap
-
detectIfNone
public int detectIfNone(IntPredicate predicate, int ifNone)
- Specified by:
detectIfNonein interfaceIntIterable
-
sum
public long sum()
- Specified by:
sumin interfaceIntIterable
-
max
public int max()
- Specified by:
maxin interfaceIntIterable
-
maxIfEmpty
public int maxIfEmpty(int defaultValue)
- Specified by:
maxIfEmptyin interfaceIntIterable
-
min
public int min()
- Specified by:
minin interfaceIntIterable
-
minIfEmpty
public int minIfEmpty(int defaultValue)
- Specified by:
minIfEmptyin interfaceIntIterable
-
average
public double average()
- Specified by:
averagein interfaceIntIterable
-
median
public double median()
- Specified by:
medianin interfaceIntIterable
-
addToValue
public int addToValue(byte key, int toBeAdded)- Specified by:
addToValuein interfaceMutableByteIntMap
-
toSortedArray
public int[] toSortedArray()
- Specified by:
toSortedArrayin interfaceIntIterable
-
toSortedList
public MutableIntList toSortedList()
- Specified by:
toSortedListin interfaceIntIterable
-
toArray
public int[] toArray()
- Specified by:
toArrayin interfaceIntIterable
-
toArray
public int[] toArray(int[] target)
- Specified by:
toArrayin interfaceIntIterable
-
contains
public boolean contains(int value)
- Specified by:
containsin interfaceIntIterable
-
containsAll
public boolean containsAll(int... source)
- Specified by:
containsAllin interfaceIntIterable
-
containsAll
public boolean containsAll(IntIterable source)
- Specified by:
containsAllin interfaceIntIterable
-
toList
public MutableIntList toList()
- Specified by:
toListin interfaceIntIterable
-
toSet
public MutableIntSet toSet()
- Specified by:
toSetin interfaceIntIterable
-
toBag
public MutableIntBag toBag()
- Specified by:
toBagin interfaceIntIterable
-
asLazy
public LazyIntIterable asLazy()
- Specified by:
asLazyin interfaceIntIterable
-
withKeyValue
public MutableByteIntMap withKeyValue(byte key, int value)
- Specified by:
withKeyValuein interfaceMutableByteIntMap
-
withoutKey
public MutableByteIntMap withoutKey(byte key)
- Specified by:
withoutKeyin interfaceMutableByteIntMap
-
withoutAllKeys
public MutableByteIntMap withoutAllKeys(ByteIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableByteIntMap
-
asUnmodifiable
public MutableByteIntMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableByteIntMap
-
asSynchronized
public MutableByteIntMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableByteIntMap
-
toImmutable
public ImmutableByteIntMap toImmutable()
- Specified by:
toImmutablein interfaceByteIntMap
-
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 MutableByteSet keySet()
- Specified by:
keySetin interfaceByteIntMap
-
values
public MutableIntCollection values()
- Specified by:
valuesin interfaceIntValuesMap
-
equals
public boolean equals(Object otherMap)
- Specified by:
equalsin interfaceByteIntMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceByteIntMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfaceByteIntMap- 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, ObjectIntToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin interfaceIntIterable
-
chunk
public RichIterable<IntIterable> chunk(int size)
- Specified by:
chunkin interfaceIntIterable
-
-