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.
-
DEFAULT_CAPACITY
- Default initial size (100).
-
DEFAULT_EMPTY_VALUE
- Default empty value (-1).
-
DEFAULT_INCREMENT
- Default increment size (50).
-
IntegerHashtable()
- Constructs a hashtable with the default initial size.
-
IntegerHashtable(int)
- Constructs a hashtable with the specified initial size.
-
IntegerHashtable(int, int)
- Constructs a hashtable with the specified initial size
and increment.
-
IntegerHashtable(IntegerHashtable)
- Copy constructor.
-
clear()
- Clears the hashtable.
-
clone()
- Clones the hashtable.
-
contains(int)
- Returns true if the hashtable contains the specified value.
-
containsKey(int)
- Returns true if the hashtable contains the specified key.
-
elements()
- Returns the values in the hashtable.
-
get(int)
- Returns the value for the specified key.
-
getEmptyValue()
- Returns the empty value.
-
isEmpty()
- Returns true if no values are stored in this hashtable.
-
keys()
- Returns the keys in the hashtable.
-
print()
- Prints the <key, value> pairs to System.out.
-
print(PrintStream)
- Prints the <key, value> pairs to the specified stream.
-
put(int, int)
- Puts the <key, value> pair in the hashtable.
-
remove(int)
- Removes the value with the specified key from the hashtable.
-
setEmptyValue(int)
- Sets the empty value.
-
size()
- Returns the number of <key, value> pairs in the hashtable.
-
toString()
- Returns a String representation of this object.
DEFAULT_CAPACITY
public static final int DEFAULT_CAPACITY
- Default initial size (100).
DEFAULT_INCREMENT
public static final int DEFAULT_INCREMENT
- Default increment size (50).
DEFAULT_EMPTY_VALUE
public static final int DEFAULT_EMPTY_VALUE
- Default empty value (-1).
IntegerHashtable
public IntegerHashtable()
- Constructs a hashtable with the default initial size.
- See Also:
- DEFAULT_CAPACITY, DEFAULT_INCREMENT
IntegerHashtable
public IntegerHashtable(int capacity)
- Constructs a hashtable with the specified initial size.
IntegerHashtable
public IntegerHashtable(int capacity,
int increment)
- Constructs a hashtable with the specified initial size
and increment.
IntegerHashtable
public IntegerHashtable(IntegerHashtable hashtable)
- Copy constructor.
clone
public Object clone()
- Clones the hashtable.
- Overrides:
- clone in class Object
clear
public synchronized void clear()
- Clears the hashtable.
contains
public synchronized boolean contains(int value)
- Returns true if the hashtable contains the specified value.
containsKey
public synchronized boolean containsKey(int key)
- Returns true if the hashtable contains the specified key.
elements
public synchronized int[] elements()
- Returns the values in the hashtable.
get
public int get(int key)
- Returns the value for the specified key.
- See Also:
- getEmptyValue
isEmpty
public boolean isEmpty()
- Returns true if no values are stored in this hashtable.
keys
public synchronized int[] keys()
- Returns the keys in the hashtable.
put
public synchronized void put(int key,
int value)
- Puts the <key, value> pair in the hashtable.
remove
public synchronized void remove(int key)
- Removes the value with the specified key from the hashtable.
size
public int size()
- Returns the number of <key, value> pairs in the hashtable.
setEmptyValue
public synchronized void setEmptyValue(int value)
- Sets the empty value.
getEmptyValue
public int getEmptyValue()
- Returns the empty value.
print
public void print()
- Prints the <key, value> pairs to System.out.
print
public synchronized void print(PrintStream out)
- Prints the <key, value> pairs to the specified stream.
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