public class ObjectCache
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
java.lang.Object[] |
keyTable |
int[] |
valueTable |
| Constructor and Description |
|---|
ObjectCache()
Constructs a new, empty hashtable.
|
ObjectCache(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(java.lang.Object key)
Returns true if the collection contains an element for the key.
|
int |
get(java.lang.Object key)
Gets the object associated with the specified key in the
hashtable.
|
int |
hashCode(java.lang.Object key)
Return the hashcode for the key parameter
|
int |
put(java.lang.Object key,
int value)
Puts the specified element into the hashtable, using the specified
key.
|
int |
size()
Returns the number of elements contained in the hashtable.
|
java.lang.String |
toString()
Converts to a rather lengthy String.
|
public ObjectCache()
public ObjectCache(int initialCapacity)
initialCapacity - int
the initial number of bucketspublic void clear()
public boolean containsKey(java.lang.Object key)
key - char[] the key that we are looking forpublic int get(java.lang.Object key)
key - char[] the specified keypublic int hashCode(java.lang.Object key)
key - org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBindingpublic int put(java.lang.Object key,
int value)
key - Object the specified key in the hashtablevalue - int the specified elementpublic int size()
int The size of the tablepublic java.lang.String toString()
toString in class java.lang.Object