- Inherits From:
- NSObject
- Conforms To:
- NSCoding
- NSMutableCopying
- NSCopying
- Declared In:
- EDObjectPair.h
id firstObject;
id secondObject;
firstObject First object of the pair. secondObject Second object of the pair.
Creating new pair objectsRetrieving objects
- + pair
- + pairWithObjectPair:
- + pairWithObjects::
- - initWithObjectPair:
- - initWithObjects::
- - firstObject
- - secondObject
- - allObjects
+ (id)pair
Creates and returns a pair containing nil
for both first and second object.
+ (id)pairWithObjectPair:(EDObjectPair *)aPair
Creates and returns a pair containing the objects in aPair.
+ (id)pairWithObjects:(id)anObject :(id)anotherObject
Creates and returns a pair containing anObject and anotherObject.
- (NSArray *)allObjects
Returns an array containing all objects in the pair. Because a pair can contain nil
references, this array can have zero, one or two objects. If both objects in the pair are not nil
the first object preceedes the second in the array.
- (id)firstObject
Returns the first object. Note that this can be nil
.
- (id)initWithObjectPair:(EDObjectPair *)aPair
Initialises a newly allocated pair by adding the objects from aPair to it. Objects are, of course, retained.
- (id)initWithObjects:(id)anObject :(id)anotherObject
Initialises a newly allocated pair by adding anObject and anotherObject to it. Objects are, of course, retained.
- (id)secondObject
Returns the second object. Note that this can be nil
.