Framework Professional Edition Package


com.prosyst.util.hash
Class HashObjIntS

java.lang.Object
  extended by com.prosyst.util.hash.HashObjIntNS
      extended by com.prosyst.util.hash.HashObjIntS

public final class HashObjIntS
extends HashObjIntNS

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


Field Summary
 
Fields inherited from class com.prosyst.util.hash.HashObjIntNS
keys, next, values
 
Constructor Summary
HashObjIntS()
           
HashObjIntS(int capacity)
           
HashObjIntS(int capacity, double lf)
           
 
Method Summary
 int get(java.lang.Object key)
          Returns an value which is mapped to the key key.
 void put(java.lang.Object key, int value)
          Adds in hashtable an element with key key and value value.
 int remove(java.lang.Object 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.HashObjIntNS
containsKey, getKeys, rehash
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashObjIntS

public HashObjIntS()

HashObjIntS

public HashObjIntS(int capacity)

HashObjIntS

public HashObjIntS(int capacity,
                   double lf)
Method Detail

put

public void put(java.lang.Object key,
                int value)
Description copied from class: HashObjIntNS
Adds in 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 HashObjIntNS
Parameters:
key - the key of the inserted element
value - the value of the inserted element

get

public int get(java.lang.Object key)
Description copied from class: HashObjIntNS
Returns an value which is mapped to the key key. If there is no such a key, throws NoSuchElementException.

Overrides:
get in class HashObjIntNS
Parameters:
key - the key we are searching for
Returns:
the value this key is mapped to in the table.

remove

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

Overrides:
remove in class HashObjIntNS
Parameters:
key - the key of the element we want to remove

size

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

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

removeAll

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

Overrides:
removeAll in class HashObjIntNS

Framework Professional Edition Package


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