Framework Professional Edition Package


com.prosyst.util.hash
Class HashObjLongS

java.lang.Object
  extended by com.prosyst.util.hash.HashObjLongNS
      extended by com.prosyst.util.hash.HashObjLongS

public final class HashObjLongS
extends HashObjLongNS

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


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

Constructor Detail

HashObjLongS

public HashObjLongS()

HashObjLongS

public HashObjLongS(int capacity)

HashObjLongS

public HashObjLongS(int capacity,
                    double lf)
Method Detail

put

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

get

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

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

remove

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

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

size

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

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

removeAll

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

Overrides:
removeAll in class HashObjLongNS

Framework Professional Edition Package


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