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 Framework Jaxer Client Framework
1.0 no

Functions

Method Action Jaxer Server Framework Jaxer 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 Details 1.0 no

Parameters
Object multiHash The multihash to which the name-value should be added
String name The name to use as a key
Object value The 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 Details 1.0 no

Parameters
Object after The MultiHash whose changes we are interested in
Object before The MultiHash relative to which the changes have occurred

Returns
Object The 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 Details 1.0 no

Parameters
Object multiHash The multihash from which the name-value should be removed
String name The name of the key
Object value The value to remove from the key -- it must not be an array

aptana_docs