| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/AddressBook.framework |
| Availability | Available in Mac OS X v10.2 and later. |
| Companion guide | |
| Declared in | ABMultiValue.h |
The ABMultiValue and ABMutableMultiValue classes are used to represent properties that might have multiple values. Each value in a multivalue list must be of the same type, and must have an associated predefined or user-defined label, and unique identifier. The labels, however, need not be unique. For example, you can have multiple Home phone numbers. Each multivalue object may have a primary identifier—used as a default value when a label is not provided. For example, a person record may have multiple addresses with the labels Home and Work, where Work is designated as the primary value. Instances of this class are immutable, see ABMutableMultiValue for methods that manipulate the content of a multivalue list.
The ABMultiValue class is “toll-free bridged” with its procedural C opaque-type counterpart. This means that the ABMultiValueRef type is interchangeable in function or method calls with instances of the ABMultiValue class.
Returns the number of entries in a multivalue list.
- (NSUInteger)count
ABMultiValue.hReturns the identifier for the given index.
- (NSString *)identifierAtIndex:(NSUInteger)index
The index of the identifier to be returned.
If the index argument is out of bounds, this method raises an exception.
ABMultiValue.hReturns the index for the given identifier.
- (NSUInteger)indexForIdentifier:(NSString *)identifier
The identifier whose index will be returned.
If the identifier is not found, returns NSNotFound.
ABMultiValue.hReturns the label for the given index.
- (NSString *)labelAtIndex:(NSUInteger)index
The index for the label to be returned.
If the index argument is out of bounds, this method raises an exception.
ABMultiValue.hReturns the label for the given identifier.
- (id)labelForIdentifier:(NSString *)identifier
The identifier for the label to be returned.
If the identifier is not found, this method returns nil.
ABMultiValue.hReturns the identifier for the primary value.
- (NSString *)primaryIdentifier
– indexForIdentifier:– setPrimaryIdentifier: (ABMutableMultiValue)ABMultiValue.hReturns the type for the values in a multivalue list.
- (ABPropertyType)propertyType
If the multivalue list is empty or its values are of different types, it returns kABErrorInProperty.
ABMultiValue.hReturns the value for the given index.
- (id)valueAtIndex:(NSUInteger)index
The index for the value to be returned.
If the index argument is out of bounds, this method raises an exception.
ABMultiValue.hReturns the value for the given identifier.
- (id)valueForIdentifier:(NSString *)identifier
The identifier for the value to be returned.
If the identifier is not found, returns nil.
ABMultiValue.hLast updated: 2009-07-20