org.anarres.jperf
Class PerfectMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
org.anarres.jperf.PerfectMap<K,V>
- All Implemented Interfaces:
- Map<K,V>
- Direct Known Subclasses:
- PerfectObjectMap, PerfectStringMap
public abstract class PerfectMap<K,V>
- extends AbstractMap<K,V>
An optimal or perfect Map.
Instances of PerfectMap are returned by a
PerfectMapGenerator.
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
PerfectMap
public PerfectMap(Map.Entry[] table)
getTableSize
public int getTableSize()
- Returns the size of the table used by this Map.
hash
protected abstract int hash(K k)
size
public int size()
- Specified by:
size in interface Map<K,V>- Overrides:
size in class AbstractMap<K,V>
containsKey
public boolean containsKey(Object k)
- Specified by:
containsKey in interface Map<K,V>- Overrides:
containsKey in class AbstractMap<K,V>
get
public V get(Object k)
- Specified by:
get in interface Map<K,V>- Overrides:
get in class AbstractMap<K,V>
remove
public V remove(Object key)
- Specified by:
remove in interface Map<K,V>- Overrides:
remove in class AbstractMap<K,V>
clear
public void clear()
- Specified by:
clear in interface Map<K,V>- Overrides:
clear in class AbstractMap<K,V>
entryIterator
protected Iterator<Map.Entry<K,V>> entryIterator()
entrySet
public Set<Map.Entry<K,V>> entrySet()
- Specified by:
entrySet in interface Map<K,V>- Specified by:
entrySet in class AbstractMap<K,V>
Copyright © 2002-2008 Shevek, Anarres. All Rights Reserved.