libs-base/Documentation/gsdoc/NSArray.gsdoc
CaS 020e3b86a1 Document last tranch of changes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10500 72102866-910b-0410-8b05-ffd578937521
2001-07-16 19:39:21 +00:00

361 lines
13 KiB
XML

<?xml version="1.0"?>
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.6//EN" "http://www.gnustep.org/gsdoc-0_6_6.xml">
<gsdoc base="NSArray" prev="NSArchiver" next="NSAssertionHandler" up="Base">
<head>
<title>NSArray</title>
<author name="Richard Frith-Macdonald">
<email address="rfm@gnu.org"/>
<url url="http://www.gnustep.org/developers/whoiswho.html"/>
</author>
<author name="Pierre-Yves Rivaille">
<email address="piking@shellyeah.com"/>
<url url=""/>
</author>
<version>$Revision$</version>
<date>$Date$</date>
</head>
<body>
<chapter>
<heading>NSArray</heading>
<class name="NSArray" super="NSObject">
<declared>Foundation/NSArray.h</declared>
<conform>NSCoding</conform>
<desc>
</desc>
<method type="id" factory="yes">
<sel>allocWithZone:</sel>
<arg type="NSZone*">zone</arg>
<desc>
TODO
</desc>
</method>
<method type="id" factory="yes">
<sel>array</sel>
<desc>
Returns a new empty array.
</desc>
</method>
<method type="id" factory="yes">
<sel>arrayWithArray:</sel>
<arg type="NSArray*">anArray</arg>
<desc>
Returns a new array containing the same elements as anArray.
</desc>
</method>
<method type="id" factory="yes">
<sel>arrayWithContentsOfFile:</sel>
<arg type="NSString*">aPath</arg>
<desc>
Returns a new array based upon the file located at aPath.
This file may be in property list format or in XML format (if XML is available).
This method returns nil if the file does not represent an array.
</desc>
</method>
<method type="id" factory="yes">
<sel>arrayWithObject:</sel>
<arg type="id">anObject</arg>
<desc>
Returns a new array containing only one object, anObject.
</desc>
</method>
<method type="id" factory="yes">
<sel>arrayWithObjects:</sel>
<arg type="id">firstObj,</arg>
<desc>
Returns a new array containing the objects passed as arguments to the method. The order is preserved.
</desc>
</method>
<method type="id" factory="yes">
<sel>arrayWithObjects:</sel>
<arg type="id*">objects</arg>
<sel>count:</sel>
<arg type="unsigned">count</arg>
<desc>
Returns a new array containing the objects that are in
the C-array objects and which size is count.
The order is preserved.
</desc>
</method>
<method type="NSArray*">
<sel>arrayByAddingObject:</sel>
<arg type="id">anObject</arg>
<desc>
Returns a new array created by adding anObject at the end of seld. The order is respected.
</desc>
</method>
<method type="NSArray*">
<sel>arrayByAddingObjectsFromArray:</sel>
<arg type="NSArray*">otherArray</arg>
<desc>
Returns a new array which is the concatenation of self and otherArray (in this precise order).
</desc>
</method>
<method type="NSString*">
<sel>componentsJoinedByString:</sel>
<arg type="NSString*">separator</arg>
<desc>
Returns a string created by the concatenation of self's elements' description separated by the string separator.
The order is preserved.
</desc>
</method>
<method type="BOOL">
<sel>containsObject:</sel>
<arg type="id">anObject</arg>
<desc>
Returns YES if anObject belongs to self. No otherwise. The isEqual: method of anObject is used to test equality.
</desc>
</method>
<method type="unsigned int">
<sel>count</sel>
<desc>
Returns the number of elements contained in self.
</desc>
</method>
<method type="NSString*">
<sel>descriptionWithLocale:</sel>
<arg type="NSDictionary*">locale</arg>
<desc>
TODO
</desc>
</method>
<method type="NSString*">
<sel>descriptionWithLocale:</sel>
<arg type="NSDictionary*">locale</arg>
<desc>
TODO
</desc>
</method>
<method type="id">
<sel>firstObjectCommonWithArray:</sel>
<arg type="NSArray*">otherArray</arg>
<desc>
Returns the first element of the array which can be found in otherArray.
Equality is tested with the isEqual method.
</desc>
</method>
<method type="void">
<sel>getObjects:</sel>
<arg type="id*">aBuffer</arg>
<desc>
This methods store all the elements of self inside aBuffer which is a C-array.
The order is preserved. You should get sure aBuffer's size is sufficient.
</desc>
</method>
<method type="void">
<sel>getObjects:</sel>
<arg type="id*">aBuffer</arg>
<sel>range:</sel>
<arg type="NSRange">aRange</arg>
<desc>
This methods store the elements of self in the range aRange inside aBuffer which is a C-array.
The order is preserved. You should get sure aBuffer's size is sufficient.
</desc>
</method>
<method type="unsigned int">
<sel>indexOfObject:</sel>
<arg type="id">anObject</arg>
<desc>
Returns the index of the first object of the array which is equal to anObject.
Equality is tested with the isEqual: method of anObject.
</desc>
</method>
<method type="unsigned int">
<sel>indexOfObject:</sel>
<arg type="id">anObject</arg>
<sel>range:</sel>
<arg type="NSRange">aRange</arg>
<desc>
Returns the index of the first object of the array which is equal to anObject and which is in aRange range.
Equality is tested with the isEqual: method of anObject.
</desc>
</method>
<method type="unsigned int">
<sel>indexOfObjectIdenticalTo:</sel>
<arg type="id">anObject</arg>
<desc>
Returns the index of the first object of the array which is physically equal to anObject.
Physical equality is tested with ==.
</desc>
</method>
<method type="unsigned int">
<sel>indexOfObjectIdenticalTo:</sel>
<arg type="id">anObject</arg>
<sel>range:</sel>
<arg type="NSRange">aRange</arg>
<desc>
Returns the index of the first object of the array which is physically equal to anObject and which is in aRange range.
Physical equality is tested with ==.
</desc>
</method>
<method type="id">
<sel>initWithArray:</sel>
<arg type="NSArray*">anArray</arg>
<desc>
Initialize the array with the content of anArray. The order is preserved.
Returns self.
</desc>
</method>
<method type="id">
<sel>initWithContentsOfFile:</sel>
<arg type="NSString*">aPath</arg>
<desc>
Initialize the array based upon the file located at aPath.
This file may be in property list format or in XML format (if XML is available).
If the file does not represent an array, self is left uninitialized and nil is returned.
Otherwise self is returned.
</desc>
</method>
<method type="id">
<sel>initWithObjects:</sel>
<arg type="id">firstObj,</arg>
<desc>
Initialize the array with the objects passed as arguments. The order is preserved.
Returns self.
NSInvalidArgumentException is raised if nil is one of the objects.
</desc>
</method>
<method type="id">
<sel>initWithObjects:</sel>
<arg type="id*">objects</arg>
<sel>count:</sel>
<arg type="unsigned">count</arg>
<desc>
Initialize the array with the objects contained in the
C-array argument which size is count.
The order is preserved.
Returns self.
NSInvalidArgumentException is raised if nil is one of the objects.
</desc>
</method>
<method type="BOOL">
<sel>isEqualToArray:</sel>
<arg type="NSArray*">otherArray</arg>
<desc>
Returns YES if the two arrays contain the same elements,
i.e. the two arrays have the same length and <br/>
for i from 0 to length - 1,
[[self objectAtIndex: i] isEqual: [anArray objectAtIndex: i]] returns YES.
</desc>
</method>
<method type="id">
<sel>lastObject</sel>
<desc>
Returns the last element of the array. If the array is empty, returns nil.
</desc>
</method>
<method type="void">
<sel>makeObjectsPerformSelector:</sel>
<arg type="SEL">aSelector</arg>
<desc>
Perform aSelector on every object of the array.
This is done sequentially from the last to the first object.
</desc>
</method>
<method type="void">
<sel>makeObjectsPerformSelector:</sel>
<arg type="SEL">aSelector</arg>
<sel>withObject:</sel>
<arg type="id">anObject</arg>
<desc>
Perform aSelector with the argument anObject on every object of the array.
This is done sequentially from the last to the first object.
</desc>
</method>
<method type="id">
<sel>objectAtIndex:</sel>
<arg type="unsigned int">index</arg>
<desc>
Returns located in the array at position index.
Raise NSRangeException if index is out of bounds
</desc>
</method>
<method type="NSEnumerator*">
<sel>objectEnumerator</sel>
<desc>
Returns an enumerator describing the array sequentially
from the first to the last element.<br/>
If you use a mutable subclass of NSArray,
you should not modify the array during enumeration
</desc>
</method>
<method type="NSArray*">
<sel>pathsMatchingExtensions:</sel>
<arg type="NSArray*">filterTypes</arg>
<desc>
Returns all the elements of the array which are NSString which
extensions are within the filterTypes NSArray.
</desc>
</method>
<method type="NSEnumerator*">
<sel>reverseObjectEnumerator</sel>
<desc>
Returns an enumerator describing the array sequentially
from the last to the first element.<br/>
If you use a mutable subclass of NSArray,
you should not modify the array during enumeration
</desc>
</method>
<method type="NSData*">
<sel>sortedArrayHint</sel>
<desc>
Returns nil. Does not do anything. TODO
</desc>
</method>
<method type="NSArray*">
<sel>sortedArrayUsingFunction:</sel>
<arg type="int(*)(id,id,void*)">comparator</arg>
<sel>context:</sel>
<arg type="void*">context</arg>
<desc>
TODO
</desc>
</method>
<method type="NSArray*">
<sel>sortedArrayUsingFunction:</sel>
<arg type="int(*)(id,id,void*)">compare</arg>
<sel>context:</sel>
<arg type="void*">context</arg>
<desc>
TODO
</desc>
</method>
<method type="NSArray*">
<sel>sortedArrayUsingSelector:</sel>
<arg type="SEL">comparator</arg>
<sel>hint:</sel>
<arg type="NSDate*">hint</arg>
<desc>
TODO
</desc>
</method>
<method type="NSArray*">
<sel>subarrayWithRange:</sel>
<arg type="NSRange">range</arg>
<desc>
Returns a new array which contains self's elements located in range.
The order is preserved.
</desc>
</method>
<method type="BOOL">
<sel>writeToFile:</sel>
<arg type="NSString*">path</arg>
<sel>atomically:</sel>
<arg type="BOOL">flag</arg>
<desc>
TODO
</desc>
</method>
<method type="BOOL">
<sel>writeToURL:</sel>
<arg type="NSURL*">url</arg>
<sel>atomically:</sel>
<arg type="BOOL">flag</arg>
<desc>
TODO
</desc>
</method>
</class>
</chapter>
</body>
</gsdoc>