public final class HashtableOfInteger
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
int |
elementSize |
java.lang.Integer[] |
keyTable |
java.lang.Object[] |
valueTable |
| Constructor and Description |
|---|
HashtableOfInteger() |
HashtableOfInteger(int size) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
java.lang.Object |
clone() |
boolean |
containsKey(int key) |
java.lang.Object |
get(int key) |
java.lang.Object |
put(int key,
java.lang.Object value) |
void |
putUnsafely(int key,
java.lang.Object value)
Put a value at the index of the given using the local hash code computation.
|
java.lang.Object |
removeKey(int key) |
int |
size() |
java.lang.String |
toString() |
public java.lang.Integer[] keyTable
public java.lang.Object[] valueTable
public int elementSize
public HashtableOfInteger()
public HashtableOfInteger(int size)
public void clear()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic boolean containsKey(int key)
public java.lang.Object get(int key)
public java.lang.Object put(int key,
java.lang.Object value)
public void putUnsafely(int key,
java.lang.Object value)
Note that this is an unsafe put as there's no prior verification whether the given key already exists in the table or not.
key - The key of the table entryvalue - The value of the table entrypublic java.lang.Object removeKey(int key)
public int size()
public java.lang.String toString()
toString in class java.lang.Object