org.eclipse.jdt.internal.compiler.codegen
Class DoubleCache

java.lang.Object
  extended by org.eclipse.jdt.internal.compiler.codegen.DoubleCache

public class DoubleCache
extends java.lang.Object


Constructor Summary
DoubleCache()
          Constructs a new, empty hashtable.
DoubleCache(int initialCapacity)
          Constructs a new, empty hashtable with the specified initial capacity.
 
Method Summary
 void clear()
          Clears the hash table so that it has no more elements in it.
 boolean containsKey(double key)
          Returns true if the collection contains an element for the key.
 int put(double key, int value)
          Puts the specified element into the hashtable, using the specified key.
 int putIfAbsent(double key, int value)
          Puts the specified element into the hashtable, using the specified key.
 java.lang.String toString()
          Converts to a rather lengthy String.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DoubleCache

public DoubleCache()
Constructs a new, empty hashtable. A default capacity and load factor is used. Note that the hashtable will automatically grow when it gets full.


DoubleCache

public DoubleCache(int initialCapacity)
Constructs a new, empty hashtable with the specified initial capacity.

Parameters:
initialCapacity - int the initial number of buckets
Method Detail

clear

public void clear()
Clears the hash table so that it has no more elements in it.


containsKey

public boolean containsKey(double key)
Returns true if the collection contains an element for the key.

Parameters:
key - double the key that we are looking for
Returns:
boolean

put

public int put(double key,
               int value)
Puts the specified element into the hashtable, using the specified key. The element may be retrieved by doing a get() with the same key.

Parameters:
key - double the specified key in the hashtable
value - int the specified element
Returns:
int value

putIfAbsent

public int putIfAbsent(double key,
                       int value)
Puts the specified element into the hashtable, using the specified key. The element may be retrieved by doing a get() with the same key.

Parameters:
key - double the specified key in the hashtable
value - int the specified element
Returns:
int value

toString

public java.lang.String toString()
Converts to a rather lengthy String.

Overrides:
toString in class java.lang.Object
Returns:
String the ascii representation of the receiver