Class FloatCache
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.codegen.FloatCache
-
Constructor Summary
ConstructorDescriptionConstructs a new, empty hashtable.FloatCache(int initialCapacity)
Constructs a new, empty hashtable with the specified initial capacity. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears the hash table so that it has no more elements in it.boolean
containsKey(float key)
Returns true if the collection contains an element for the key.int
put(float key, int value)
Puts the specified element into the hashtable, using the specified key.int
putIfAbsent(float key, int value)
Puts the specified element into the hashtable, using the specified key.toString()
Converts to a rather lengthy String.
-
Constructor Details
-
FloatCache
public FloatCache()Constructs a new, empty hashtable. A default capacity and load factor is used. Note that the hashtable will automatically grow when it gets full. -
FloatCache
public FloatCache(int initialCapacity)Constructs a new, empty hashtable with the specified initial capacity.- Parameters:
initialCapacity
- int the initial number of buckets
-
-
Method Details
-
clear
public void clear()Clears the hash table so that it has no more elements in it. -
containsKey
public boolean containsKey(float key)Returns true if the collection contains an element for the key.- Parameters:
key
-float
the key that we are looking for- Returns:
- boolean
-
put
public int put(float 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
-float
the specified key in the hashtablevalue
-int
the specified element- Returns:
- int value
-
putIfAbsent
public int putIfAbsent(float 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
-float
the specified key in the hashtablevalue
-int
the specified element- Returns:
- int value
-
toString
Converts to a rather lengthy String.
-