ECKeyToListMap


Abstract

This class implements mapping key --> list, where a key uniquely maps to a list of items. The main purpose of this class is to support operations like add(list_key, item), where item has to be added to the list selected by the given key.

Methods

-addListItem
adds an item to a list which is identified by "aKey". If the list does not exist then it will be created.
-addListItem:forKey:
adds an item to a list which is identified by "aKey". If the list does not exist then it will be created.
-allKeys
-existsListItem
-existsListItem:forKey:
-listItemsOfKey:
-removeListItem
removes the specified item. Does nothing if the item does not exist.
-removeListItem:forKey:
removes the specified item. Does nothing if the item does not exist.

addListItem


adds an item to a list which is identified by "aKey". If the list does not exist then it will be created.

See Also:
addListItem:forKey:
- addListItem: (id) aListItem forKey: (id) aKey;
Parameter Descriptions
aListItem
item to add
aKey
corresponding key identifying the list
method result
self

addListItem:forKey:


adds an item to a list which is identified by "aKey". If the list does not exist then it will be created.

See Also:
addListItem
- addListItem: (id) aListItem forKey: (id) aKey;
Parameter Descriptions
aListItem
item to add
aKey
corresponding key identifying the list

allKeys


- (id <ECIterator>) allKeys;
method result
returns the keys of all lists

existsListItem


See Also:
existsListItem:forKey:
- (BOOL) existsListItem: (id) aListItem forKey: (id) aKey;
Parameter Descriptions
aListItem
item to look for
aKey
key identifying a list
method result
YES if the specified item exists in the specified list

existsListItem:forKey:


See Also:
existsListItem
- (BOOL) existsListItem: (id) aListItem forKey: (id) aKey;
Parameter Descriptions
aListItem
item to look for
aKey
key identifying a list

listItemsOfKey:


- (id <ECIterator>) listItemsOfKey: (id) aKey;
Parameter Descriptions
aKey
key specifying a list
method result
returns all items of the specified list

removeListItem


removes the specified item. Does nothing if the item does not exist.

See Also:
removeListItem:forKey:
- removeListItem: (id) aListItem forKey: (id) aKey;
Parameter Descriptions
aListItem
item to remove
aKey
specifies the list
method result
self

removeListItem:forKey:


removes the specified item. Does nothing if the item does not exist.

See Also:
removeListItem
- removeListItem: (id) aListItem forKey: (id) aKey;
Parameter Descriptions
aListItem
item to remove
aKey
specifies the list

(Last Updated August 27, 2006)