ai
Class LookupTable

java.lang.Object
  extended by ai.LookupTable

public class LookupTable
extends Object

The LookupTable represents an efficient hash table to Variations with two properties that make a regular HashMap unsuitable: - The LookupTable uses bounded memory, choosing to replace old cells rather than expand. - The LookupTable does not check for collisions in hashCode. As a result, LookupTable is fast, space-efficient, and occasionally wrong. LookupTable is thread-safe.

Specification Fields :
mapping : Map //The map represented by this table

Constructor Summary
LookupTable()
           
 
Method Summary
 Variation getTable(Object g)
          Get the value (probably) associated with an object, or null.
 void update(Object g, Variation var)
          Set the Variation associated with an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LookupTable

public LookupTable()
Method Detail

getTable

public Variation getTable(Object g)
Get the value (probably) associated with an object, or null.


update

public void update(Object g,
                   Variation var)
Set the Variation associated with an object.