aicas logo Jamaica 3.4 release 8

sun.text
Class IntHashtable

java.lang.Object
  extended by sun.text.IntHashtable

public final class IntHashtable
extends Object

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

IntHashtable

public IntHashtable()

IntHashtable

public IntHashtable(int initialSize)
Method Detail

size

public int size()

isEmpty

public boolean isEmpty()

put

public void put(int key,
                int value)

get

public int get(int key)

remove

public void remove(int key)

getDefaultValue

public int getDefaultValue()

setDefaultValue

public void setDefaultValue(int newValue)

equals

public boolean equals(Object that)
Description copied from class: Object
equals compares this object to another object.

Equals 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.

Overrides:
equals in class Object
Parameters:
that - the other object.
Returns:
if this and other are considered equal.

hashCode

public int hashCode()
Description copied from class: Object
hashCode returns a hash code for this object. The hash code must be equal for two objects a and b if a.equals(b) is true.

The default implementation returns System.identityHashCode(this).

Overrides:
hashCode in class Object
Returns:
a hash code value.

clone

public Object clone()
             throws CloneNotSupportedException
Description copied from class: Object
clone creates a shallow clone of this.

Overrides:
clone in class Object
Returns:
a clone of this object.
Throws:
CloneNotSupportedException - if this does not implement the Cloneable interface.

putInternal

public void putInternal(int key,
                        int value)

aicas logo Jamaica 3.4 release 8

aicas GmbH, Karlsruhe - Germany    www.aicas.com
Copyright 2001-2009 aicas GmbH. All Rights Reserved.