A map that can contain multiple values per key value. This is a utility class that can be used as a data structure for:
Constructor for a new Lookup.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
new sap.ui.vtm.Lookup(equalsFunc)
Param | Type | Default Value | Description |
---|---|---|---|
equalsFunc | function | A function to compare two values for equality (takes two values as parameters and returns true if they are equal). |
Method | Description |
---|---|
addValue |
Adds a value to the set of values stored against a given key. |
clear |
Clears the Lookup. |
sap.ui.vtm.Lookup.extend |
Creates a new subclass of class sap.ui.vtm.Lookup with name
|
forEach |
Loops over the key/value array pairs calling the callback function for each pair. |
sap.ui.vtm.Lookup.getMetadata |
Returns a metadata object for class sap.ui.vtm.Lookup. |
getValues |
Gets the values stored against a given key. |
hasValue |
Returns whether there are any values stored against the given key. |
removeValue |
Removes a particular value. |
Adds a value to the set of values stored against a given key.
Param | Type | DefaultValue | Description |
---|---|---|---|
key | any |
The key. |
|
value | any |
The value. |
Creates a new subclass of class sap.ui.vtm.Lookup with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.core.Element.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Loops over the key/value array pairs calling the callback function for each pair.
Param | Type | DefaultValue | Description |
---|---|---|---|
callback | function |
The callback function to call for each key/value array pair. The first argument to the callback function is the value array and the second parameter is the key. |
Gets the values stored against a given key.
Param | Type | DefaultValue | Description |
---|---|---|---|
key | any |
The key to use to index the Lookup. |