Klasse ObjectCache
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.codegen.ObjectCache
-
Feldübersicht
-
Konstruktorübersicht
KonstruktorBeschreibungConstructs a new, empty hashtable.ObjectCache
(int initialCapacity) Constructs a new, empty hashtable with the specified initial capacity. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
clear()
Clears the hash table so that it has no more elements in it.boolean
containsKey
(Object key) Returns true if the collection contains an element for the key.int
Gets the object associated with the specified key in the hashtable.int
Return the hashcode for the key parameterint
Puts the specified element into the hashtable, using the specified key.int
size()
Returns the number of elements contained in the hashtable.toString()
Converts to a rather lengthy String.
-
Felddetails
-
keyTable
-
valueTable
public int[] valueTable
-
-
Konstruktordetails
-
ObjectCache
public ObjectCache()Constructs a new, empty hashtable. A default capacity is used. Note that the hashtable will automatically grow when it gets full. -
ObjectCache
public ObjectCache(int initialCapacity) Constructs a new, empty hashtable with the specified initial capacity.- Parameter:
initialCapacity
- int the initial number of buckets
-
-
Methodendetails
-
clear
public void clear()Clears the hash table so that it has no more elements in it. -
containsKey
Returns true if the collection contains an element for the key.- Parameter:
key
- char[] the key that we are looking for- Gibt zurück:
- boolean
-
get
Gets the object associated with the specified key in the hashtable.- Parameter:
key
-char[]
the specified key- Gibt zurück:
- int the element for the key or -1 if the key is not defined in the hash table.
-
hashCode
Return the hashcode for the key parameter- Parameter:
key
- org.eclipse.jdt.internal.compiler.lookup.MethodBinding- Gibt zurück:
- int
-
put
Puts the specified element into the hashtable, using the specified key. The element may be retrieved by doing a get() with the same key. The key and the element cannot be null.- Parameter:
key
-Object
the specified key in the hashtablevalue
-int
the specified element- Gibt zurück:
- int the old value of the key, or -1 if it did not have one.
-
size
public int size()Returns the number of elements contained in the hashtable.- Gibt zurück:
int
The size of the table
-
toString
Converts to a rather lengthy String.
-