com.netbilling.util
Class StringHash

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable
          extended by com.netbilling.util.StringHash
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map
Direct Known Subclasses:
V3Client.Request, V3Client.Response

public class StringHash
extends java.util.Hashtable

This class is used to store attribte-value String pairs

See Also:
Serialized Form

Constructor Summary
StringHash()
           
StringHash(java.util.Hashtable x)
           
 
Method Summary
 java.lang.String get(java.lang.String key)
          Return the value for attribute key, or a blank string ("") if no value exists.
 java.lang.String nvl(java.lang.String key, java.lang.String default_value)
          If there is no value for attribute key, or if the value is blank, return default_value.
 void set(java.lang.String key, java.lang.String value)
          Set the value for attribute key.
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringHash

public StringHash()

StringHash

public StringHash(java.util.Hashtable x)
Method Detail

nvl

public java.lang.String nvl(java.lang.String key,
                            java.lang.String default_value)
If there is no value for attribute key, or if the value is blank, return default_value. If key exists and has a value, return its value.

Parameters:
key - return value for this attribute
default_value - return this string if there's no value for key

get

public java.lang.String get(java.lang.String key)
Return the value for attribute key, or a blank string ("") if no value exists.

Parameters:
key - return value for this attribute

set

public void set(java.lang.String key,
                java.lang.String value)
Set the value for attribute key. If value is null or blank ("") the attribute is removed.

Parameters:
key - set value for this attribute
value - set key attribute's value to this string

Version 3.1.1

This is propriatary and confidential unpublished information. Copyright(c) 1999-2014, All rights reserved.