Package org.relique.jdbc.csv
Class MinimumMemoryMap<K,V>
- java.lang.Object
-
- org.relique.jdbc.csv.MinimumMemoryMap<K,V>
-
- All Implemented Interfaces:
java.util.Map<K,V>
public class MinimumMemoryMap<K,V> extends java.lang.Object implements java.util.Map<K,V>
Array based implementation of the Map interface. This implementation uses the minimum amount of memory to store keys and values. Keys are kept in sorted order, so time for inserts and lookups is O(log2(N)).
-
-
Constructor Summary
Constructors Constructor Description MinimumMemoryMap()
MinimumMemoryMap(int initialSize)
MinimumMemoryMap(java.util.Map<K,V> otherMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(java.lang.Object key)
boolean
containsValue(java.lang.Object value)
java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
V
get(java.lang.Object key)
boolean
isEmpty()
java.util.Set<K>
keySet()
V
put(K key, V value)
void
putAll(java.util.Map<? extends K,? extends V> m)
V
remove(java.lang.Object key)
int
size()
java.lang.String
toString()
java.util.Collection<V>
values()
-
-
-
Method Detail
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
values
public java.util.Collection<V> values()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-