org.anarres.jperf
Class PerfectMap<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by 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>


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
PerfectMap(Map.Entry[] table)
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object k)
           
protected  Iterator<Map.Entry<K,V>> entryIterator()
           
 Set<Map.Entry<K,V>> entrySet()
           
 V get(Object k)
           
 int getTableSize()
          An additional method.
protected abstract  int hash(K k)
           
 V remove(Object key)
           
 int size()
           
 
Methods inherited from class java.util.AbstractMap
clone, containsValue, equals, hashCode, isEmpty, keySet, put, putAll, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PerfectMap

public PerfectMap(Map.Entry[] table)
Method Detail

getTableSize

public int getTableSize()
An additional method.


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.