Jaxer.Util.MultiHash : Object
Return to: Jaxer Framework index

Namespace used to hold functions that create and manipulate a hash whose values are primitives or Arrays of primitives

Platform Support

Jaxer Server FrameworkJaxer Client Framework
1.0no

Functions

MethodActionJaxer Server FrameworkJaxer Client Framework
static add(Object multiHash, String name, Object value) : void
Adds the name-value pair to the MultiHash: if the name does not exist, it is added with the given value; if the name exists, the previous value is turned into an Array, if needed, and then the given value is appended to it
Show Details1.0no

Parameters
ObjectmultiHashThe multihash to which the name-value should be added
StringnameThe name to use as a key
ObjectvalueThe value to associate with the key -- it must not be an array

static diff(Object after, Object before) : Object
Analyzes the first MultiHash relative to the second
Show Details1.0no

Parameters
ObjectafterThe MultiHash whose changes we are interested in
ObjectbeforeThe MultiHash relative to which the changes have occurred

Returns
ObjectThe results of the analysis, an object with three properties: 'added' is a hash of all the name-value pairs added; 'changed' is a hash of all the name-value pairs that have changed (the value is the one in after); and 'deleted' is a hash of all the name-value pairs that have been deleted (the value is the one in before, of course)

static remove(Object multiHash, String name, Object value) : void
Removes the name-value pair from the MultiHash: if the name does not exist, or it does not have the value, nothing happens; if the name exists and has the value, that value is removed, and if no more values remain for that name, the name is removed
Show Details1.0no

Parameters
ObjectmultiHashThe multihash from which the name-value should be removed
StringnameThe name of the key
ObjectvalueThe value to remove from the key -- it must not be an array

aptana_docs