net.kbox.common
Class KHashtable

java.lang.Object
  extended by java.util.Dictionary
      extended by java.util.Hashtable
          extended by net.kbox.common.KHashtable
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map

public class KHashtable
extends java.util.Hashtable

KHashtable is a subclass of Hashtable, which including some useful feature.

Author:
blackBox
See Also:
Serialized Form

Constructor Summary
KHashtable()
           
KHashtable(java.util.Hashtable hs)
          Create a KHashtable with specified Hashtable.
 
Method Summary
 boolean getBoolean(java.lang.String name)
          Get a Boolean object with the name;.
 byte getByte(java.lang.String name)
          Get byte value with the name.
 double getDouble(java.lang.String name)
          Get double value with the name.
 float getFloat(java.lang.String name)
          Get float value with the name.
 int getInt(java.lang.String name)
          Get int value with the name.
 long getLong(java.lang.String name)
          Get long value with the name.
 short getShort(java.lang.String name)
          Get short value with the name.
 java.lang.String getString(java.lang.String name)
          Get a String value with the name.
 void put(java.lang.Object key, byte value)
          Put in a byte value with the key
 void put(java.lang.Object key, double value)
          Put in a double value with the key
 void put(java.lang.Object key, float value)
          Put in a float value with the key
 void put(java.lang.Object key, int value)
          Put in an int value with the key
 void put(java.lang.Object key, long value)
          Put in a long value with the key
 void put(java.lang.Object key, short value)
          Put in a short value with the 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

KHashtable

public KHashtable()

KHashtable

public KHashtable(java.util.Hashtable hs)
Create a KHashtable with specified Hashtable.

Parameters:
hs - the original Hashtable
Method Detail

getDouble

public double getDouble(java.lang.String name)
Get double value with the name.

Parameters:
name -
Returns:
if the property dose not exit, -1 will be returned.

getInt

public int getInt(java.lang.String name)
Get int value with the name.

Parameters:
name -
Returns:
if the property dose not exit, -1 will be returned.

getByte

public byte getByte(java.lang.String name)
Get byte value with the name.

Parameters:
name -
Returns:
if the property dose not exit, -1 will be returned.

getShort

public short getShort(java.lang.String name)
Get short value with the name.

Parameters:
name -
Returns:
if the property dose not exit, -1 will be returned.

getLong

public long getLong(java.lang.String name)
Get long value with the name.

Parameters:
name -
Returns:
if the property dose not exit, -1 will be returned.

getFloat

public float getFloat(java.lang.String name)
Get float value with the name.

Parameters:
name -
Returns:
if the property dose not exit, -1 will be returned.

getString

public java.lang.String getString(java.lang.String name)
Get a String value with the name.

Parameters:
name -
Returns:
if the property dose not exit, null will be returned.

getBoolean

public boolean getBoolean(java.lang.String name)
Get a Boolean object with the name;.

Parameters:
name -
Returns:
if the property dose not exit, null will be returned.

put

public void put(java.lang.Object key,
                byte value)
Put in a byte value with the key

Parameters:
key -
value -

put

public void put(java.lang.Object key,
                short value)
Put in a short value with the key

Parameters:
key -
value -

put

public void put(java.lang.Object key,
                int value)
Put in an int value with the key

Parameters:
key -
value -

put

public void put(java.lang.Object key,
                long value)
Put in a long value with the key

Parameters:
key -
value -

put

public void put(java.lang.Object key,
                float value)
Put in a float value with the key

Parameters:
key -
value -

put

public void put(java.lang.Object key,
                double value)
Put in a double value with the key

Parameters:
key -
value -