Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIDictionary Interface Reference

A simple mutable table of objects, accessed by key. More...

import "nsIDictionary.idl";

Inheritance diagram for nsIDictionary:
Inheritance graph
[legend]
Collaboration diagram for nsIDictionary:
Collaboration graph
[legend]

List of all members.

Public Member Functions

boolean hasKey (in string key)
 Check if a given key is present in the dictionary.
void getKeys (out PRUint32 count,[retval, array, size_is(count)] out string keys)
 Retrieve all keys in the dictionary.
nsISupports getValue (in string key)
 Find the value indicated by the key.
void setValue (in string key, in nsISupports value)
 Add the key-value pair to the dictionary.
nsISupports deleteValue (in string key)
 Delete the indicated key-value pair.
void clear ()
 Delete all key-value pairs from the dictionary.

Detailed Description

A simple mutable table of objects, accessed by key.

Definition at line 51 of file nsIDictionary.idl.


Member Function Documentation

Delete all key-value pairs from the dictionary.

nsISupports nsIDictionary::deleteValue ( in string  key)

Delete the indicated key-value pair.

Parameters:
keyThe key indicating the pair to be removed.
Returns:
The removed value. If the key doesn't exist, NS_ERROR_FAILURE will be returned.
void nsIDictionary::getKeys ( out PRUint32  count,
[retval, array, size_is(count)] out string  keys 
)

Retrieve all keys in the dictionary.

Returns:
array of all keys, unsorted.
nsISupports nsIDictionary::getValue ( in string  key)

Find the value indicated by the key.

Parameters:
keyThe lookup key indicating the value.
Returns:
Value indicated by key. If the key doesn't exist, NS_ERROR_FAILURE will be returned.

Check if a given key is present in the dictionary.

Parameters:
keyKey to check for
Returns:
true if present, false if absent.
void nsIDictionary::setValue ( in string  key,
in nsISupports  value 
)

Add the key-value pair to the dictionary.

If the key is already present, replace the old value with the new.

Parameters:
keyThe key by which the value can be accessed
valueThe value to be stored.

The documentation for this interface was generated from the following file: