Skip navigation links


com.thortech.xl.util.adapters
Class tcUtilHashTableOperations

java.lang.Object
  extended by com.thortech.xl.util.adapters.tcUtilHashTableOperations


public class tcUtilHashTableOperations
extends java.lang.Object

This class that has basic Hashtable operations utility methods. Author: Sobhan Sunil Dasari January 25, 2002.


Constructor Summary
tcUtilHashTableOperations()
          Creates a new tcUtilHashTableOperations object.
tcUtilHashTableOperations(java.util.Hashtable obj)
          Constructor uses existing hashtable

 

Method Summary
 java.util.Hashtable getHashtable()
          return hashtable
 java.lang.Object getValue(java.lang.Object key)
          return Object for a key of type String class
 java.lang.String getValue(java.lang.String key)
          return String value for a key of type String class
 java.util.Hashtable initHashtable()
          return hashtable
 java.util.Hashtable put(java.lang.Object key, java.lang.Object value)
          Puts the key value pair in the hash table
 java.util.Hashtable put(java.lang.String key, java.lang.String value)
          put string key value pair
 java.util.Hashtable put(java.util.Vector vKeys, java.util.Vector vValues)
          put Vector key-value pairs in the HashTable
 java.util.Hashtable putValueAsVector(java.lang.String key, java.lang.String value)
          Returns a Hash Table where values are as a Vector

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

tcUtilHashTableOperations

public tcUtilHashTableOperations()
Creates a new tcUtilHashTableOperations object.

tcUtilHashTableOperations

public tcUtilHashTableOperations(java.util.Hashtable obj)
Constructor uses existing hashtable
Parameters:
HashTable -

Method Detail

initHashtable

public java.util.Hashtable initHashtable()
return hashtable
Returns:
hashtable

getHashtable

public java.util.Hashtable getHashtable()
return hashtable
Returns:
hashtable

getValue

public java.lang.String getValue(java.lang.String key)
return String value for a key of type String class
Parameters:
key - Key for which the value is to be fetched
Returns:
String value from the HashTable for the specified Key

getValue

public java.lang.Object getValue(java.lang.Object key)
return Object for a key of type String class
Parameters:
key - Key for which the value is to be fetched
Returns:
Object From the HashTable for the specified Key

put

public java.util.Hashtable put(java.lang.String key,
                               java.lang.String value)
put string key value pair
Parameters:
key - Key to be inserted int he Hash Table
value - Value to be inserted int he Hash Table
Returns:
Hash Table

putValueAsVector

public java.util.Hashtable putValueAsVector(java.lang.String key,
                                            java.lang.String value)
Returns a Hash Table where values are as a Vector
Parameters:
key - Key to be inserted int he Hash Table
value - Value to be inserted int he Hash Table
Returns:
HashTable

put

public java.util.Hashtable put(java.lang.Object key,
                               java.lang.Object value)
Puts the key value pair in the hash table
Parameters:
key - Object to be used as Key
value - Object to be used as Value
Returns:
HashTable with the new value populated

put

public java.util.Hashtable put(java.util.Vector vKeys,
                               java.util.Vector vValues)
put Vector key-value pairs in the HashTable
Parameters:
vKeys - Vector having Keys to be inserted in the HashTable
vValues - Vector having corresponding values to be inserted in the HashTable
Returns:
HashTable

Skip navigation links


Copyright © 2010, Oracle and/or its affiliates. All rights reserved.