com.atlassian.bamboo.webwork.util
Class ActionParametersMapImpl

java.lang.Object
  extended by com.google.common.collect.ForwardingObject
      extended by com.google.common.collect.ForwardingMap<java.lang.String,java.lang.Object>
          extended by com.atlassian.bamboo.webwork.util.ActionParametersMapImpl
All Implemented Interfaces:
ActionParametersMap, java.util.Map<java.lang.String,java.lang.Object>

public class ActionParametersMapImpl
extends com.google.common.collect.ForwardingMap<java.lang.String,java.lang.Object>
implements ActionParametersMap


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
ActionParametersMapImpl(com.opensymphony.xwork.ActionContext actionContext)
           
ActionParametersMapImpl(java.util.Map<java.lang.String,?> parameters)
           
 
Method Summary
protected  java.util.Map<java.lang.String,java.lang.Object> delegate()
           
 boolean getBoolean(java.lang.String key)
          Returns a boolean value from the map of parameters.
 double getDouble(java.lang.String key, double defaultValue)
          Retrieve Double value from the map of parameters.
 int getInt(java.lang.String key, int defaultValue)
          Retrieve Integer value from the map of parameters.
 long getLong(java.lang.String key, long defaultValue)
          Retrieve Long value from the map of parameters.
 java.util.Map<java.lang.String,java.lang.Object> getParameters()
          Returns internal map of parameters.
 java.lang.String getString(java.lang.String key)
          Returns a String value from the map of parameters.
 java.lang.String[] getStringArray(java.lang.String key)
          Returns a String[] value from the map of parameters.
 
Methods inherited from class com.google.common.collect.ForwardingMap
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class com.google.common.collect.ForwardingObject
toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

ActionParametersMapImpl

public ActionParametersMapImpl(com.opensymphony.xwork.ActionContext actionContext)

ActionParametersMapImpl

public ActionParametersMapImpl(java.util.Map<java.lang.String,?> parameters)
Method Detail

delegate

protected java.util.Map<java.lang.String,java.lang.Object> delegate()
Overrides:
delegate in class com.google.common.collect.ForwardingMap<java.lang.String,java.lang.Object>

getString

@Nullable
public java.lang.String getString(@Nullable
                                           java.lang.String key)
Description copied from interface: ActionParametersMap
Returns a String value from the map of parameters. If the key does not exist in the map, then null is returned.

Specified by:
getString in interface ActionParametersMap
Parameters:
key - Key of value to be searched in the map
Returns:
String value of object found or null if not found

getStringArray

@Nullable
public java.lang.String[] getStringArray(@Nullable
                                                  java.lang.String key)
Description copied from interface: ActionParametersMap
Returns a String[] value from the map of parameters. If the key does not exist in the map, then null is returned.

Specified by:
getStringArray in interface ActionParametersMap
Parameters:
key - Key of value to be searched in the map
Returns:
String[] value of object found or null if not found

getDouble

public double getDouble(@Nullable
                        java.lang.String key,
                        double defaultValue)
Description copied from interface: ActionParametersMap
Retrieve Double value from the map of parameters. If the key does not exist in the map, or is not convertible to Double then default value is returned.

Specified by:
getDouble in interface ActionParametersMap
Parameters:
key - Key of value to be searched in the map
defaultValue - Default value to be returned if key not found or not convertible to Double
Returns:
Value of object found or defaultValue if not convertible to Double or not found

getInt

public int getInt(@Nullable
                  java.lang.String key,
                  int defaultValue)
Description copied from interface: ActionParametersMap
Retrieve Integer value from the map of parameters. If the key does not exist in the map, or is not convertible to Integer then default value is returned.

Specified by:
getInt in interface ActionParametersMap
Parameters:
key - Key of value to be searched in the map
defaultValue - Default value to be returned if key not found or not convertible to Integer
Returns:
Value of object found or defaultValue if not convertible to Integer or not found

getLong

public long getLong(@Nullable
                    java.lang.String key,
                    long defaultValue)
Description copied from interface: ActionParametersMap
Retrieve Long value from the map of parameters. If the key does not exist in the map, or is not convertible to Long then default value is returned.

Specified by:
getLong in interface ActionParametersMap
Parameters:
key - Key of value to be searched in the map
defaultValue - Default value to be returned if key not found or not convertible to Long
Returns:
Value of object found or defaultValue if not convertible to Long or not found

getBoolean

public boolean getBoolean(@Nullable
                          java.lang.String key)
Description copied from interface: ActionParametersMap
Returns a boolean value from the map of parameters. If it does no exist in the map, then false is returned

Specified by:
getBoolean in interface ActionParametersMap
Parameters:
key - Key of value to be searched in the map
Returns:
True if the value converted to true or false otherwise

getParameters

public java.util.Map<java.lang.String,java.lang.Object> getParameters()
Description copied from interface: ActionParametersMap
Returns internal map of parameters.

Specified by:
getParameters in interface ActionParametersMap
Returns:
Parameters map


Copyright © 2010 Atlassian. All Rights Reserved.