org.utgenome.gwt.utgb.client.util
Class CanonicalProperties

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,String>
          extended by org.utgenome.gwt.utgb.client.util.CanonicalProperties
All Implemented Interfaces:
Serializable, Cloneable, Map<String,String>

public class CanonicalProperties
extends HashMap<String,String>

Using canonical parameter keys for providing case and space insensitive property map.

Author:
leo
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
CanonicalProperties()
           
 
Method Summary
 void add(String key, boolean value)
           
 void add(String key, float value)
           
 void add(String key, int value)
           
 void add(String key, long value)
           
 void add(String key, String value)
           
 String get(String key)
           
 String get(String key, String defaultValue)
          Gets the String value associated with the given key.
 boolean getBoolean(String key)
           
 boolean getBoolean(String key, boolean defaultValue)
          Gets the boolean value associated with the given key.
 float getFloat(String key)
           
 float getFloat(String key, float defaultValue)
          Gets the float value associated with the given key.
 int getInt(String key)
           
 int getInt(String key, int defaultValue)
          Gets the integer value associated with the given key.
 String put(String key, String value)
           
 void putAll(Map<? extends String,? extends String> m)
           
static String toCanonicalName(String key)
           
static String toNaturalName(String keyName)
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

CanonicalProperties

public CanonicalProperties()
Method Detail

toCanonicalName

public static String toCanonicalName(String key)

toNaturalName

public static String toNaturalName(String keyName)

putAll

public void putAll(Map<? extends String,? extends String> m)
Specified by:
putAll in interface Map<String,String>
Overrides:
putAll in class HashMap<String,String>

put

public String put(String key,
                  String value)
Specified by:
put in interface Map<String,String>
Overrides:
put in class HashMap<String,String>

add

public void add(String key,
                String value)

add

public void add(String key,
                int value)

add

public void add(String key,
                long value)

add

public void add(String key,
                float value)

add

public void add(String key,
                boolean value)

get

public String get(String key)

get

public String get(String key,
                  String defaultValue)
Gets the String value associated with the given key. If any corresponding value is not found, returns the default value.

Parameters:
key - the key
defaultValue - the default value
Returns:
the string value

getInt

public int getInt(String key)

getInt

public int getInt(String key,
                  int defaultValue)
Gets the integer value associated with the given key. If any corresponding value is not found, returns the given default value

Parameters:
key -
defaultValue -
Returns:

getFloat

public float getFloat(String key)

getFloat

public float getFloat(String key,
                      float defaultValue)
Gets the float value associated with the given key. If any corresponding value is not found, returns the given default value

Parameters:
key -
defaultValue -
Returns:

getBoolean

public boolean getBoolean(String key)

getBoolean

public boolean getBoolean(String key,
                          boolean defaultValue)
Gets the boolean value associated with the given key. If any corresponding value is not found, returns the given default value

Parameters:
key -
defaultValue -
Returns:


Copyright © 2007-2012 utgenome.org. All Rights Reserved.