FileDocCategorySizeDatePackage
MapUtils.javaAPI DocApache Axis 1.43443Sat Apr 22 18:57:28 BST 2006org.apache.axis.transport.jms

MapUtils

public class MapUtils extends Object
MapUtils provides convenience methods for accessing a java.util.Map
author
Jaime Meritt (jmeritt@sonicsoftware.com)
author
Richard Chung (rchung@sonicsoftware.com)
author
Dave Chappell (chappell@sonicsoftware.com)

Fields Summary
Constructors Summary
Methods Summary
public static booleanremoveBooleanProperty(java.util.Map properties, java.lang.String key, boolean defaultValue)
Returns a boolean property from a Map and removes it.

param
properties
param
key
param
defaultValue
return

        boolean value = defaultValue;
        if(properties != null && properties.containsKey(key))
        {
            try{value = ((Boolean)properties.remove(key)).booleanValue();}catch(Exception ignore){}
        }
        return value;
    
public static intremoveIntProperty(java.util.Map properties, java.lang.String key, int defaultValue)
Returns an int property from a Map and removes it.

param
properties
param
key
param
defaultValue
return

        int value = defaultValue;
        if(properties != null && properties.containsKey(key))
        {
            try{value = ((Integer)properties.remove(key)).intValue();}catch(Exception ignore){}
        }
        return value;
    
public static longremoveLongProperty(java.util.Map properties, java.lang.String key, long defaultValue)
Returns a long property from a Map and removes it.

param
properties
param
key
param
defaultValue
return

        long value = defaultValue;
        if(properties != null && properties.containsKey(key))
        {
            try{value = ((Long)properties.remove(key)).longValue();}catch(Exception ignore){}
        }
        return value;
    
public static java.lang.ObjectremoveObjectProperty(java.util.Map properties, java.lang.String key, java.lang.Object defaultValue)
Returns an Object property from a Map and removes it.

param
properties
param
key
param
defaultValue
return

        Object value = defaultValue;
        if(properties != null && properties.containsKey(key))
        {
            value = properties.remove(key);
        }
        return value;
    
public static java.lang.StringremoveStringProperty(java.util.Map properties, java.lang.String key, java.lang.String defaultValue)
Returns a String property from a Map and removes it.

param
properties
param
key
param
defaultValue
return

        String value = defaultValue;
        if(properties != null && properties.containsKey(key))
        {
            try{value = (String)properties.remove(key);}catch(Exception ignore){}
        }
        return value;