com.sencha.gxt.legacy.client.core
Class LegacyParams

java.lang.Object
  extended by com.sencha.gxt.legacy.client.core.LegacyParams

public class LegacyParams
extends Object

Aggregates both a list of values and a map of named values. Allows methods to support both list and maps in a single parameter.

Note that only one type of values should be specified.


Constructor Summary
LegacyParams()
          Creates a new params instance.
LegacyParams(Map<String,Object> values)
          Creates a new params instance.
LegacyParams(Object... values)
          Creates a new params instance.
LegacyParams(String key, Object value)
          Creates a new parameters instance.
 
Method Summary
 LegacyParams add(Object value)
          Adds a value.
 List<Object> getList()
          Returns the list values.
 Map<String,Object> getMap()
          Returns the values as a map.
 JavaScriptObject getValues()
          Returns the values as a JavaScriptObject.
 boolean isList()
          Returns true if the parameters are a list.
 boolean isMap()
          Returns true if the parameters are a map.
 LegacyParams set(String key, Object value)
          Sets a value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LegacyParams

public LegacyParams()
Creates a new params instance.


LegacyParams

public LegacyParams(Map<String,Object> values)
Creates a new params instance.

Parameters:
values - the initial values

LegacyParams

public LegacyParams(Object... values)
Creates a new params instance.

Parameters:
values - the initial values

LegacyParams

public LegacyParams(String key,
                    Object value)
Creates a new parameters instance.

Parameters:
key - the key
value - the value
Method Detail

add

public LegacyParams add(Object value)
Adds a value.

Parameters:
value - the value to add
Returns:
this

getList

public List<Object> getList()
Returns the list values.

Returns:
the list values

getMap

public Map<String,Object> getMap()
Returns the values as a map.

Returns:
the map of values

getValues

public JavaScriptObject getValues()
Returns the values as a JavaScriptObject.

Returns:
the values

isList

public boolean isList()
Returns true if the parameters are a list.

Returns:
true if a list

isMap

public boolean isMap()
Returns true if the parameters are a map.

Returns:
true if a map

set

public LegacyParams set(String key,
                        Object value)
Sets a value.

Parameters:
key - the key
value - the value
Returns:
this


Copyright © 2011. All Rights Reserved.