|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsun.text.IntHashtable
public final class IntHashtable
Simple internal class for doing hash mapping. Much, much faster than the
standard Hashtable for integer to integer mappings,
and doesn't require object creation.
If a key is not found, the defaultValue is returned.
Note: the keys are limited to values above Integer.MIN_VALUE+1.
| Constructor Summary | |
|---|---|
IntHashtable()
|
|
IntHashtable(int initialSize)
|
|
| Method Summary | |
|---|---|
Object |
clone()
clone creates a shallow clone of this. |
boolean |
equals(Object that)
equals compares this object to another object. |
int |
get(int key)
|
int |
getDefaultValue()
|
int |
hashCode()
hashCode returns a hash code for this object. |
boolean |
isEmpty()
|
void |
put(int key,
int value)
|
void |
putInternal(int key,
int value)
|
void |
remove(int key)
|
void |
setDefaultValue(int newValue)
|
int |
size()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IntHashtable()
public IntHashtable(int initialSize)
| Method Detail |
|---|
public int size()
public boolean isEmpty()
public void put(int key,
int value)
public int get(int key)
public void remove(int key)
public int getDefaultValue()
public void setDefaultValue(int newValue)
public boolean equals(Object that)
ObjectEquals must be symmetric (a.equals(b) == b.equals(a)), reflexive (a.equals(a)==true) and transitive (a.equals(b) && b.equals(c) IMPLIES (a.equals(c))) and not change over time (a.equals(b) == a.equals(b)). a.equals(null) should always return false.
If a.equals(b) is true for two objects a and b, then a.hashCode()==b.hashCode() must hold.
The default implementation of equals returns this==other.
equals in class Objectthat - the other object.
public int hashCode()
ObjectThe default implementation returns System.identityHashCode(this).
hashCode in class Object
public Object clone()
throws CloneNotSupportedException
Object
clone in class ObjectCloneNotSupportedException - if this does not implement the
Cloneable interface.
public void putInternal(int key,
int value)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||