org.eclipse.jdt.internal.compiler.util
Class SimpleLookupTable

java.lang.Object
  extended by org.eclipse.jdt.internal.compiler.util.SimpleLookupTable
All Implemented Interfaces:
Cloneable

public final class SimpleLookupTable
extends Object
implements Cloneable

A simple lookup table is a non-synchronized Hashtable, whose keys and values are Objects. It also uses linear probing to resolve collisions rather than a linked list of hash table entries.


Field Summary
 int elementSize
           
 Object[] keyTable
           
 int threshold
           
 Object[] valueTable
           
 
Constructor Summary
SimpleLookupTable()
           
SimpleLookupTable(int size)
           
 
Method Summary
 Object clone()
           
 boolean containsKey(Object key)
           
 Object get(Object key)
           
 Object getKey(Object key)
           
 Object keyForValue(Object valueToMatch)
           
 Object put(Object key, Object value)
           
 Object removeKey(Object key)
           
 void removeValue(Object valueToRemove)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

keyTable

public Object[] keyTable

valueTable

public Object[] valueTable

elementSize

public int elementSize

threshold

public int threshold
Constructor Detail

SimpleLookupTable

public SimpleLookupTable()

SimpleLookupTable

public SimpleLookupTable(int size)
Method Detail

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

containsKey

public boolean containsKey(Object key)

get

public Object get(Object key)

getKey

public Object getKey(Object key)

keyForValue

public Object keyForValue(Object valueToMatch)

put

public Object put(Object key,
                  Object value)

removeKey

public Object removeKey(Object key)

removeValue

public void removeValue(Object valueToRemove)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.