absurdist
Class LinkSimCacheHash

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended byabsurdist.LinkSimCacheHash
All Implemented Interfaces:
java.lang.Cloneable, LinkSimCache, java.util.Map, java.io.Serializable

class LinkSimCacheHash
extends java.util.Hashtable
implements LinkSimCache

LinkSimCache implemented as a Hashtable

See Also:
LinkSimCache

Nested Class Summary
 
Nested classes inherited from class java.util.Hashtable
 
Constructor Summary
(package private) LinkSimCacheHash()
           
 
Method Summary
 double get(Link lo, Link ln)
          Retrieves the value representing Sim(lo,ln), or NaN if none was stored)
 double put(Link lo, Link ln, double val)
          Stores the value representing Sim(lo,ln).
 void setSizes(int loCnt, int lnCnt)
          No effect
 int size()
          Returns the number of values stored
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinkSimCacheHash

LinkSimCacheHash()
Method Detail

put

public double put(Link lo,
                  Link ln,
                  double val)
Stores the value representing Sim(lo,ln). Returns the value previously stored in the table (NaN if none was stored)

Specified by:
put in interface LinkSimCache

get

public double get(Link lo,
                  Link ln)
Retrieves the value representing Sim(lo,ln), or NaN if none was stored)

Specified by:
get in interface LinkSimCache

setSizes

public void setSizes(int loCnt,
                     int lnCnt)
No effect

Specified by:
setSizes in interface LinkSimCache
Parameters:
loCnt - How many distinct values for the first argument to put() are expected.
lnCnt - How many distinct values for the second argument to put() are expected.

size

public int size()
Returns the number of values stored