|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jdt.internal.compiler.codegen.IntegerCache
public class IntegerCache
Field Summary | |
---|---|
int[] |
keyTable
|
int[] |
valueTable
|
Constructor Summary | |
---|---|
IntegerCache()
Constructs a new, empty hashtable. |
|
IntegerCache(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(int key)
Returns true if the collection contains an element for the key. |
int |
hash(int key)
Return a hashcode for the value of the key parameter. |
int |
put(int key,
int value)
Puts the specified element into the hashtable, using the specified key. |
int |
putIfAbsent(int key,
int value)
Puts the specified element into the hashtable if absent, 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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int[] keyTable
public int[] valueTable
Constructor Detail |
---|
public IntegerCache()
public IntegerCache(int initialCapacity)
initialCapacity
- int
the initial number of bucketsMethod Detail |
---|
public void clear()
public boolean containsKey(int key)
key
- double
the key that we are looking for
public int hash(int key)
key
- int
public int put(int key, int value)
key
- int
the specified key in the hashtablevalue
- int
the specified element
public int putIfAbsent(int key, int value)
key
- int
the specified key in the hashtablevalue
- int
the specified element
public int size()
int
The size of the tablepublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |