Framework Professional Edition Package


com.prosyst.util.hash
Class HashIntObjS

java.lang.Object
  extended by com.prosyst.util.hash.HashIntObjNS
      extended by com.prosyst.util.hash.HashIntObjS

public final class HashIntObjS
extends HashIntObjNS

Synchronized extension of com.prosyst.util.hash.HashIntObjNS


Field Summary
 
Fields inherited from class com.prosyst.util.hash.HashIntObjNS
keys, next, values
 
Constructor Summary
HashIntObjS()
           
HashIntObjS(int capacity)
           
HashIntObjS(int capacity, double lf)
           
 
Method Summary
 java.lang.Object get(int key)
          Returns an value which is mapped to the key key.
 void put(int key, java.lang.Object value)
          Adds in the hashtable an element with key key and value value.
 java.lang.Object remove(int key)
          Removes an element with the specified key from the table.
 void removeAll()
          Empties the hash table
 int size()
          Returns the count of elements currently in the table
 
Methods inherited from class com.prosyst.util.hash.HashIntObjNS
rehash
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashIntObjS

public HashIntObjS()

HashIntObjS

public HashIntObjS(int capacity)

HashIntObjS

public HashIntObjS(int capacity,
                   double lf)
Method Detail

put

public void put(int key,
                java.lang.Object value)
Description copied from class: HashIntObjNS
Adds in the hashtable an element with key key and value value. If an element with the specified key is already in the table only change it's value.

Overrides:
put in class HashIntObjNS
Parameters:
key - the key of the inserted element
value - the value of the inserted element

get

public java.lang.Object get(int key)
Description copied from class: HashIntObjNS
Returns an value which is mapped to the key key.

Overrides:
get in class HashIntObjNS
Parameters:
key - the key we are searching for
Returns:
the value this key is mapped to in the table, or null

remove

public java.lang.Object remove(int key)
Description copied from class: HashIntObjNS
Removes an element with the specified key from the table. Does nothing if there is no element with this key.

Overrides:
remove in class HashIntObjNS
Parameters:
key - the key of the element we want to remove
Returns:
the removed value, or null if there was nothing to remove

size

public int size()
Description copied from class: HashIntObjNS
Returns the count of elements currently in the table

Overrides:
size in class HashIntObjNS
Returns:
the count of elements

removeAll

public void removeAll()
Description copied from class: HashIntObjNS
Empties the hash table

Overrides:
removeAll in class HashIntObjNS

Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved