All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.taligent.util.IntegerHashtable

java.lang.Object
   |
   +----COM.taligent.util.IntegerHashtable

public class IntegerHashtable
extends Object
implements Cloneable, Serializable
An integer hashtable. Quite useful.

Version:
1.0
Author:
Andy Clark, Taligent Inc.

Variable Index

 o DEFAULT_CAPACITY
Default initial size (100).
 o DEFAULT_EMPTY_VALUE
Default empty value (-1).
 o DEFAULT_INCREMENT
Default increment size (50).

Constructor Index

 o IntegerHashtable()
Constructs a hashtable with the default initial size.
 o IntegerHashtable(int)
Constructs a hashtable with the specified initial size.
 o IntegerHashtable(int, int)
Constructs a hashtable with the specified initial size and increment.
 o IntegerHashtable(IntegerHashtable)
Copy constructor.

Method Index

 o clear()
Clears the hashtable.
 o clone()
Clones the hashtable.
 o contains(int)
Returns true if the hashtable contains the specified value.
 o containsKey(int)
Returns true if the hashtable contains the specified key.
 o elements()
Returns the values in the hashtable.
 o get(int)
Returns the value for the specified key.
 o getEmptyValue()
Returns the empty value.
 o isEmpty()
Returns true if no values are stored in this hashtable.
 o keys()
Returns the keys in the hashtable.
 o print()
Prints the <key, value> pairs to System.out.
 o print(PrintStream)
Prints the <key, value> pairs to the specified stream.
 o put(int, int)
Puts the <key, value> pair in the hashtable.
 o remove(int)
Removes the value with the specified key from the hashtable.
 o setEmptyValue(int)
Sets the empty value.
 o size()
Returns the number of <key, value> pairs in the hashtable.
 o toString()
Returns a String representation of this object.

Variables

 o DEFAULT_CAPACITY
 public static final int DEFAULT_CAPACITY
Default initial size (100).

 o DEFAULT_INCREMENT
 public static final int DEFAULT_INCREMENT
Default increment size (50).

 o DEFAULT_EMPTY_VALUE
 public static final int DEFAULT_EMPTY_VALUE
Default empty value (-1).

Constructors

 o IntegerHashtable
 public IntegerHashtable()
Constructs a hashtable with the default initial size.

See Also:
DEFAULT_CAPACITY, DEFAULT_INCREMENT
 o IntegerHashtable
 public IntegerHashtable(int capacity)
Constructs a hashtable with the specified initial size.

 o IntegerHashtable
 public IntegerHashtable(int capacity,
                         int increment)
Constructs a hashtable with the specified initial size and increment.

 o IntegerHashtable
 public IntegerHashtable(IntegerHashtable hashtable)
Copy constructor.

Methods

 o clone
 public Object clone()
Clones the hashtable.

Overrides:
clone in class Object
 o clear
 public synchronized void clear()
Clears the hashtable.

 o contains
 public synchronized boolean contains(int value)
Returns true if the hashtable contains the specified value.

 o containsKey
 public synchronized boolean containsKey(int key)
Returns true if the hashtable contains the specified key.

 o elements
 public synchronized int[] elements()
Returns the values in the hashtable.

 o get
 public int get(int key)
Returns the value for the specified key.

See Also:
getEmptyValue
 o isEmpty
 public boolean isEmpty()
Returns true if no values are stored in this hashtable.

 o keys
 public synchronized int[] keys()
Returns the keys in the hashtable.

 o put
 public synchronized void put(int key,
                              int value)
Puts the <key, value> pair in the hashtable.

 o remove
 public synchronized void remove(int key)
Removes the value with the specified key from the hashtable.

 o size
 public int size()
Returns the number of <key, value> pairs in the hashtable.

 o setEmptyValue
 public synchronized void setEmptyValue(int value)
Sets the empty value.

 o getEmptyValue
 public int getEmptyValue()
Returns the empty value.

 o print
 public void print()
Prints the <key, value> pairs to System.out.

 o print
 public synchronized void print(PrintStream out)
Prints the <key, value> pairs to the specified stream.

 o toString
 public String toString()
Returns a String representation of this object.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index