Class SynchronizedByteLongMap
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.SynchronizedByteLongMap
-
- All Implemented Interfaces:
Serializable,LongIterable,ByteLongMap,LongValuesMap,MutableByteLongMap,MutableLongValuesMap,PrimitiveIterable
public class SynchronizedByteLongMap extends Object implements MutableByteLongMap, Serializable
A synchronized view of aMutableByteLongMap. It is imperative that the user manually synchronize on the collection when iterating over it using theMutableLongIteratoras perCollections.synchronizedCollection(Collection).This file was automatically generated from template file synchronizedPrimitivePrimitiveMap.stg.
- Since:
- 3.1.
- See Also:
MutableByteLongMap.asSynchronized(),MutableMap.asSynchronized(), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedByteLongMap(MutableByteLongMap map)SynchronizedByteLongMap(MutableByteLongMap map, Object newLock)
-
Method Summary
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ByteLongMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.api.LongIterable
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.LongValuesMap
tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableByteLongMap
withAllKeyValues
-
-
-
-
Constructor Detail
-
SynchronizedByteLongMap
public SynchronizedByteLongMap(MutableByteLongMap map)
-
SynchronizedByteLongMap
public SynchronizedByteLongMap(MutableByteLongMap map, Object newLock)
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clearin interfaceMutableLongValuesMap
-
put
public void put(byte key, long value)- Specified by:
putin interfaceMutableByteLongMap
-
putPair
public void putPair(ByteLongPair keyValuePair)
- Specified by:
putPairin interfaceMutableByteLongMap
-
putAll
public void putAll(ByteLongMap map)
- Specified by:
putAllin interfaceMutableByteLongMap
-
updateValues
public void updateValues(ByteLongToLongFunction function)
- Specified by:
updateValuesin interfaceMutableByteLongMap
-
removeKey
public void removeKey(byte key)
- Specified by:
removeKeyin interfaceMutableByteLongMap
-
remove
public void remove(byte key)
- Specified by:
removein interfaceMutableByteLongMap
-
removeKeyIfAbsent
public long removeKeyIfAbsent(byte key, long value)- Specified by:
removeKeyIfAbsentin interfaceMutableByteLongMap
-
getIfAbsentPut
public long getIfAbsentPut(byte key, long value)- Specified by:
getIfAbsentPutin interfaceMutableByteLongMap
-
getAndPut
public long getAndPut(byte key, long putValue, long defaultValue)- Specified by:
getAndPutin interfaceMutableByteLongMap
-
getIfAbsentPut
public long getIfAbsentPut(byte key, LongFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableByteLongMap
-
getIfAbsentPutWithKey
public long getIfAbsentPutWithKey(byte key, ByteToLongFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableByteLongMap
-
getIfAbsentPutWith
public <P> long getIfAbsentPutWith(byte key, LongFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableByteLongMap
-
updateValue
public long updateValue(byte key, long initialValueIfAbsent, LongToLongFunction function)- Specified by:
updateValuein interfaceMutableByteLongMap
-
get
public long get(byte key)
- Specified by:
getin interfaceByteLongMap
-
getIfAbsent
public long getIfAbsent(byte key, long ifAbsent)- Specified by:
getIfAbsentin interfaceByteLongMap
-
getOrThrow
public long getOrThrow(byte key)
- Specified by:
getOrThrowin interfaceByteLongMap
-
containsKey
public boolean containsKey(byte key)
- Specified by:
containsKeyin interfaceByteLongMap
-
containsValue
public boolean containsValue(long value)
- Specified by:
containsValuein interfaceLongValuesMap
-
forEachValue
public void forEachValue(LongProcedure procedure)
- Specified by:
forEachValuein interfaceLongValuesMap
-
forEachKey
public void forEachKey(ByteProcedure procedure)
- Specified by:
forEachKeyin interfaceByteLongMap
-
forEachKeyValue
public void forEachKeyValue(ByteLongProcedure procedure)
- Specified by:
forEachKeyValuein interfaceByteLongMap
-
keysView
public LazyByteIterable keysView()
- Specified by:
keysViewin interfaceByteLongMap
-
keyValuesView
public RichIterable<ByteLongPair> keyValuesView()
- Specified by:
keyValuesViewin interfaceByteLongMap
-
flipUniqueValues
public MutableLongByteMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceByteLongMap- Specified by:
flipUniqueValuesin interfaceMutableByteLongMap
-
select
public MutableByteLongMap select(ByteLongPredicate predicate)
- Specified by:
selectin interfaceByteLongMap- Specified by:
selectin interfaceMutableByteLongMap
-
reject
public MutableByteLongMap reject(ByteLongPredicate predicate)
- Specified by:
rejectin interfaceByteLongMap- Specified by:
rejectin interfaceMutableByteLongMap
-
longIterator
public MutableLongIterator longIterator()
This must be manually synchronized by the developer.- Specified by:
longIteratorin interfaceLongIterable- Specified by:
longIteratorin interfaceMutableLongValuesMap
-
each
public void each(LongProcedure procedure)
- Specified by:
eachin interfaceLongIterable- Since:
- 7.0.
-
count
public int count(LongPredicate predicate)
- Specified by:
countin interfaceLongIterable
-
anySatisfy
public boolean anySatisfy(LongPredicate predicate)
- Specified by:
anySatisfyin interfaceLongIterable
-
allSatisfy
public boolean allSatisfy(LongPredicate predicate)
- Specified by:
allSatisfyin interfaceLongIterable
-
noneSatisfy
public boolean noneSatisfy(LongPredicate predicate)
- Specified by:
noneSatisfyin interfaceLongIterable
-
select
public MutableLongBag select(LongPredicate predicate)
- Specified by:
selectin interfaceLongIterable- Specified by:
selectin interfaceLongValuesMap- Specified by:
selectin interfaceMutableLongValuesMap
-
reject
public MutableLongBag reject(LongPredicate predicate)
- Specified by:
rejectin interfaceLongIterable- Specified by:
rejectin interfaceLongValuesMap- Specified by:
rejectin interfaceMutableLongValuesMap
-
collect
public <V> MutableBag<V> collect(LongToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceLongIterable- Specified by:
collectin interfaceLongValuesMap- Specified by:
collectin interfaceMutableLongValuesMap
-
detectIfNone
public long detectIfNone(LongPredicate predicate, long ifNone)
- Specified by:
detectIfNonein interfaceLongIterable
-
sum
public long sum()
- Specified by:
sumin interfaceLongIterable
-
max
public long max()
- Specified by:
maxin interfaceLongIterable
-
maxIfEmpty
public long maxIfEmpty(long defaultValue)
- Specified by:
maxIfEmptyin interfaceLongIterable
-
min
public long min()
- Specified by:
minin interfaceLongIterable
-
minIfEmpty
public long minIfEmpty(long defaultValue)
- Specified by:
minIfEmptyin interfaceLongIterable
-
average
public double average()
- Specified by:
averagein interfaceLongIterable
-
median
public double median()
- Specified by:
medianin interfaceLongIterable
-
addToValue
public long addToValue(byte key, long toBeAdded)- Specified by:
addToValuein interfaceMutableByteLongMap
-
toSortedArray
public long[] toSortedArray()
- Specified by:
toSortedArrayin interfaceLongIterable
-
toSortedList
public MutableLongList toSortedList()
- Specified by:
toSortedListin interfaceLongIterable
-
toArray
public long[] toArray()
- Specified by:
toArrayin interfaceLongIterable
-
toArray
public long[] toArray(long[] target)
- Specified by:
toArrayin interfaceLongIterable
-
contains
public boolean contains(long value)
- Specified by:
containsin interfaceLongIterable
-
containsAll
public boolean containsAll(long... source)
- Specified by:
containsAllin interfaceLongIterable
-
containsAll
public boolean containsAll(LongIterable source)
- Specified by:
containsAllin interfaceLongIterable
-
toList
public MutableLongList toList()
- Specified by:
toListin interfaceLongIterable
-
toSet
public MutableLongSet toSet()
- Specified by:
toSetin interfaceLongIterable
-
toBag
public MutableLongBag toBag()
- Specified by:
toBagin interfaceLongIterable
-
asLazy
public LazyLongIterable asLazy()
- Specified by:
asLazyin interfaceLongIterable
-
withKeyValue
public MutableByteLongMap withKeyValue(byte key, long value)
- Specified by:
withKeyValuein interfaceMutableByteLongMap
-
withoutKey
public MutableByteLongMap withoutKey(byte key)
- Specified by:
withoutKeyin interfaceMutableByteLongMap
-
withoutAllKeys
public MutableByteLongMap withoutAllKeys(ByteIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableByteLongMap
-
asUnmodifiable
public MutableByteLongMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableByteLongMap
-
asSynchronized
public MutableByteLongMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableByteLongMap
-
toImmutable
public ImmutableByteLongMap toImmutable()
- Specified by:
toImmutablein interfaceByteLongMap
-
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 interfaceByteLongMap
-
values
public MutableLongCollection values()
- Specified by:
valuesin interfaceLongValuesMap
-
equals
public boolean equals(Object otherMap)
- Specified by:
equalsin interfaceByteLongMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceByteLongMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfaceByteLongMap- 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, ObjectLongToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin interfaceLongIterable
-
chunk
public RichIterable<LongIterable> chunk(int size)
- Specified by:
chunkin interfaceLongIterable
-
-