FoundationExtension
FoundationExtension is common Foundation/UIKit/Cocoa shortcuts and snippets collection.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
NSADataObject.h
Go to the documentation of this file.
1 //
2 // NSADataObject.h
3 // FoundationExtension
4 //
5 // Created by Jeong YunWon on 12. 3. 30..
6 // Copyright (c) 2012 youknowone.org. All rights reserved.
7 //
8 
19 
23 @protocol NSAArrayLikeDataObject <NSObject, NSFastEnumeration, NSAIndexedSubscript>
24 
28 @property(nonatomic, readonly) NSUInteger count;
29 
36 - (id)objectAtIndex:(NSUInteger)index;
37 
44 - (NSUInteger)indexOfObject:(id)anObject;
45 
52 - (BOOL)containsObject:(id)anObject;
53 
61 - (id):(NSUInteger)index __deprecated;
62 
66 @property(readonly, copy) NSArray *allObjects;
67 
68 @end
69 
74 
80 - (void)replaceObjectAtIndex:(NSUInteger)index withObject:(id)anObject;
81 
82 @end
83 
84 
88 @interface NSATuple: NSObject<NSCopying, NSMutableCopying, NSAArrayLikeDataObject> {
90 }
94 @property(unsafe_unretained, nonatomic, readonly) id first;
98 @property(unsafe_unretained, nonatomic, readonly) id second;
99 
104 + (instancetype)tuple;
105 
114 - (instancetype)initWithFirst:(id)first second:(id)second;
119 + (instancetype)tupleWithFirst:(id)first second:(id)second;
120 
121 @end
122 
123 
128 
132 @property(nonatomic, strong) id first;
136 @property(nonatomic, strong) id second;
137 
141 - (void)swap;
142 
147 - (void)setTuple:(NSATuple *)otherTuple;
148 
149 @end
150 
151 
155 @interface NSATriple: NSObject<NSCopying, NSMutableCopying, NSAArrayLikeDataObject> {
157 }
158 
162 @property(unsafe_unretained, nonatomic, readonly) id first;
166 @property(unsafe_unretained, nonatomic, readonly) id second;
170 @property(unsafe_unretained, nonatomic, readonly) id third;
171 
176 + (instancetype)triple;
177 
188 - (instancetype)initWithFirst:(id)first second:(id)second third:(id)third;
193 + (instancetype)tripleWithFirst:(id)first second:(id)second third:(id)third;
194 
195 @end
196 
197 
202 
206 @property(nonatomic, strong) id first;
210 @property(nonatomic, strong) id second;
214 @property(nonatomic, strong) id third;
215 
220 - (void)setTriple:(NSATriple *)otherTriple;
221 
222 @end
id _second
Definition: NSADataObject.h:89
void swap()
Swap first and second.
This protocol defines NSArray-like interface methods for data objects.
Definition: NSADataObject.h:23
Manages ordered collections of 2 objects.
Definition: NSADataObject.h:127
NSArray * allObjects
Returns an array containing the container’s members, or an empty array if the container has no membe...
Definition: NSADataObject.h:66
The indexed subscript getter protocol NSAIndexedSubscript must be adopted and implemented by immutabl...
Definition: NSASubscript.h:22
This protocol defines NSMutableArray-like interface methods for data objects.
Definition: NSADataObject.h:73
Manages ordered collections of 3 objects.
Definition: NSADataObject.h:201
The indexed subscript setter protocol NSAMutableIndexedSubscript must be adopted and implemented by m...
Definition: NSASubscript.h:39
NSUInteger count
Returns the number of objects currently in the data object.
Definition: NSADataObject.h:28
Manages ordered collections of 2 objects.
Definition: NSADataObject.h:88
Protocols to handle indexed or keyed subscript of modern Objective-C.
id second
second object
Definition: NSADataObject.h:136
Manages ordered collections of 3 objects.
Definition: NSADataObject.h:155
id first
first object
Definition: NSADataObject.h:132
id _first
Definition: NSADataObject.h:89
id _third
Definition: NSADataObject.h:156