com.extjs.gxt.ui.client.util
Class Params

java.lang.Object
  extended by com.extjs.gxt.ui.client.util.Params

public class Params
extends java.lang.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.


Field Summary
 boolean isList
          Deprecated. see isList().
 boolean isMap
          Deprecated. see isMap()
 
Constructor Summary
Params()
          Creates a new params instance.
Params(java.util.Map<java.lang.String,java.lang.Object> values)
          Creates a new params instance.
Params(java.lang.Object... values)
          Creates a new params instance.
Params(java.lang.String key, java.lang.Object value)
          Creates a new parameters instance.
 
Method Summary
 Params add(java.lang.Object value)
          Adds a value.
 java.util.List<java.lang.Object> getList()
          Returns the list values.
 java.util.Map<java.lang.String,java.lang.Object> getMap()
          Returns the values as a map.
 com.google.gwt.core.client.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.
 Params set(java.lang.String key, java.lang.Object value)
          Sets a value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isList

public boolean isList
Deprecated. see isList().
True if the parameters are a list of values.


isMap

public boolean isMap
Deprecated. see isMap()
True if the parameters are a map of key / value pairs.

Constructor Detail

Params

public Params()
Creates a new params instance.


Params

public Params(java.util.Map<java.lang.String,java.lang.Object> values)
Creates a new params instance.

Parameters:
values - the initial values

Params

public Params(java.lang.Object... values)
Creates a new params instance.

Parameters:
values - the initial values

Params

public Params(java.lang.String key,
              java.lang.Object value)
Creates a new parameters instance.

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

add

public Params add(java.lang.Object value)
Adds a value.

Parameters:
value - the value to add
Returns:
this

getList

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

Returns:
the list values

getMap

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

Returns:
the map of values

getValues

public com.google.gwt.core.client.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 Params set(java.lang.String key,
                  java.lang.Object value)
Sets a value.

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