public class FloatCache
extends java.lang.Object
| Constructor and Description |
|---|
FloatCache()
Constructs a new, empty hashtable.
|
FloatCache(int initialCapacity)
Constructs a new, empty hashtable with the specified initial
capacity.
|
| Modifier and Type | Method and Description |
|---|---|
void |
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.
|
java.lang.String |
toString()
Converts to a rather lengthy String.
|
public FloatCache()
public FloatCache(int initialCapacity)
initialCapacity - int
the initial number of bucketspublic void clear()
public boolean containsKey(float key)
key - float the key that we are looking forpublic int put(float key,
int value)
key - float the specified key in the hashtablevalue - int the specified elementpublic int putIfAbsent(float key,
int value)
key - float the specified key in the hashtablevalue - int the specified elementpublic java.lang.String toString()
toString in class java.lang.Object