Package com.illumon.iris.db.tables.libs
Class DbMap<K,V>
java.lang.Object
com.illumon.iris.db.tables.libs.DbMap<K,V>
- All Implemented Interfaces:
Externalizable
,Serializable
,Map<K,V>
- Direct Known Subclasses:
DbMapStringDouble
,DbMapStringInt
,DbMapStringLong
,DbMapStringString
public abstract class DbMap<K,V> extends Object implements Map<K,V>, Externalizable
A map implementation optimized for DB use.
- See Also:
- Serialized Form
-
Nested Class Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
DbMap(boolean sortedToString)
-
Method Summary
Modifier and Type Method Description void
clear()
boolean
containsKey(Object key)
boolean
containsValue(Object value)
Set<Map.Entry<K,V>>
entrySet()
boolean
equals(Object o)
V
get(Object key)
int
hashCode()
boolean
isEmpty()
Set<K>
keySet()
V
put(K key, V value)
void
putAll(Map<? extends K,? extends V> m)
void
readExternal(ObjectInput in)
protected abstract K
readKey(ObjectInput in)
protected abstract V
readValue(ObjectInput in)
V
remove(Object key)
int
size()
String
toString()
Collection<V>
values()
void
writeExternal(ObjectOutput out)
protected abstract void
writeKey(ObjectOutput out, K key)
protected abstract void
writeValue(ObjectOutput out, V value)
Methods inherited from class java.lang.Object
clone, 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
-
DbMap
protected DbMap(boolean sortedToString)
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKey
in interfaceMap<K,V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,V>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
hashCode
public int hashCode() -
equals
-
toString
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
writeKey
- Throws:
IOException
-
readKey
- Throws:
IOException
-
writeValue
- Throws:
IOException
-
readValue
- Throws:
IOException
-