Package com.tangosol.util
Class BinaryLongMap.SimpleMapImpl
java.lang.Object
com.tangosol.util.Base
com.tangosol.util.AbstractKeyBasedMap
com.tangosol.util.BinaryLongMap.SimpleMapImpl
- All Implemented Interfaces:
Map
- Enclosing interface:
BinaryLongMap
A java.util.Map<Binary, Long> implementation. This is a
simple wrapper around a BinaryLongMap.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.tangosol.util.AbstractKeyBasedMap
AbstractKeyBasedMap.DeferredCacheEvent<K,
V>, AbstractKeyBasedMap.EntrySet, AbstractKeyBasedMap.KeySet, AbstractKeyBasedMap.ValuesCollection Nested classes/interfaces inherited from class com.tangosol.util.Base
Base.LoggingWriter
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a SimpleMapImpl using a BinaryRadixTree as the internal storage.Construct a SimpleMapImpl around an existing BinaryLongMap. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear all key/value mappings.boolean
containsKey
(Object oKey) Returns true if this map contains a mapping for the specified key.Returns the value to which this map maps the specified key.protected Iterator
Create an iterator over the keys in this Map.Associates the specified value with the specified key in this map.Removes the mapping for this key from this map if present.int
size()
Returns the number of key-value mappings in this map.Methods inherited from class com.tangosol.util.AbstractKeyBasedMap
clone, containsValue, entrySet, equals, getAll, hashCode, instantiateEntrySet, instantiateKeySet, instantiateValues, isEmpty, keySet, putAll, removeBlind, toString, values
Methods inherited from class com.tangosol.util.Base
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getProcessRandom, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mergeArray, mergeBooleanArray, mergeByteArray, mergeCharArray, mergeDoubleArray, mergeFloatArray, mergeIntArray, mergeLongArray, mod, mod, newHashMap, newHashMap, newHashSet, newHashSet, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
SimpleMapImpl
public SimpleMapImpl()Construct a SimpleMapImpl using a BinaryRadixTree as the internal storage. -
SimpleMapImpl
Construct a SimpleMapImpl around an existing BinaryLongMap.- Parameters:
blm
- the BinaryLongMap to use as the storage for this map
-
-
Method Details
-
clear
public void clear()Clear all key/value mappings.- Specified by:
clear
in interfaceMap
- Overrides:
clear
in classAbstractKeyBasedMap
-
containsKey
Returns true if this map contains a mapping for the specified key.- Specified by:
containsKey
in interfaceMap
- Overrides:
containsKey
in classAbstractKeyBasedMap
- Returns:
- true if this map contains a mapping for the specified key, false otherwise.
-
get
Returns the value to which this map maps the specified key.- Specified by:
get
in interfaceMap
- Specified by:
get
in classAbstractKeyBasedMap
- Parameters:
oKey
- the key object- Returns:
- the value to which this map maps the specified key, or null if the map contains no mapping for this key
-
put
Associates the specified value with the specified key in this map.- Specified by:
put
in interfaceMap
- Overrides:
put
in classAbstractKeyBasedMap
- Parameters:
oKey
- key with which the specified value is to be associatedoValue
- value to be associated with the specified key- Returns:
- previous value associated with specified key, or null if there was no mapping for key
-
remove
Removes the mapping for this key from this map if present. Expensive: updates both the underlying cache and the local cache.- Specified by:
remove
in interfaceMap
- Overrides:
remove
in classAbstractKeyBasedMap
- Parameters:
oKey
- key whose mapping is to be removed from the map- Returns:
- previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key, if the implementation supports null values.
-
size
public int size()Returns the number of key-value mappings in this map.- Specified by:
size
in interfaceMap
- Overrides:
size
in classAbstractKeyBasedMap
- Returns:
- the number of key-value mappings in this map
-
iterateKeys
Create an iterator over the keys in this Map. The Iterator must support remove() if the Map supports removal.- Specified by:
iterateKeys
in classAbstractKeyBasedMap
- Returns:
- a new instance of an Iterator over the keys in this Map
-