ftp.nice.ch/peanuts/GeneralData/Documents/openstep/OpenStepSpec_rtf.tar.gz#/OpenStepSpec_rtf/FoundationKit/Classes/NSNumber.rtf

This is NSNumber.rtf in view mode; [Download] [Up]

paperh18648 margl-907 margr0 margt0 margb0 fi0 ri0 ql sb0 f1 fs24 Copyright f3 'e3f1 1994 by NeXT Computer, Inc.  All Rights Reserved.

s4 li100 fi0 ri1007 ql f0 b fs36 fs100 
fs36 NSNumber 
pard s11 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 
fs28 f0 b fs24 Inherits From:tab b0 fs28 f1 NSValue : NSObject
fs20 
fs28 s6 f0 b fs24 Conforms To:tab b0 fs28 f1 NSCoding, NSCopying (NSValue)
fi0 NSObject (NSObject)
fs20 
fs28 s7 fi-2771 f0 b fs24 Declared In:tab b0 fs28 f1 Foundation/NSValue.h 
fs20 
fs28 pard s16 li100 fi0 ri1007 ql f0 b fs28 fs20 
fs28 Class Description
fs14 
fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 
fs28 NSNumber objects provide an object-oriented wrapper for the standard C-language number data types (b intb0 , b doubleb0 , etc.). The Foundation Kit'27s collection classes can store only objects, so this class provides a way to prepare numbers of various types for use with the collection classes.
fs16 
fs28 NSNumber, which inherits from NSValue, provides methods for creating number objects that contain data of a specified type. It also provides methods for extracting data from a number object and casting the data to be of a particular type. For determining whether two number objects are equal, NSNumber provides theb  compare:b0  method.
fs16 
fs28 pard s16 li100 fi0 ri1007 ql f0 b fs24 
fs28 Allocating and Initializing 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 + (NSNumber *)b numberWithBool:b0 (BOOL)i valuei0 tab Creates and returns a number object representing i valuei0  of the type b BOOLb0 .fs28  
fi-6552 fs28 fs16 
fs28 fi-6552 + (NSNumber *)b numberWithChar:b0 (char)i valuei0 tab Creates and returns a number object representing i valuei0  of the type b charb0 .
fi-6552 fs16 
fs28 fi-6552 + (NSNumber *)b numberWithDouble:b0 (double)i value
s9 li7030 fi-6553 fi-5796 i0 tab Creates and returns a number object representing i valuei0  of the type b doubleb0 .
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 + (NSNumber *)b numberWithFloat:b0 (float)i valuei0 tab Creates and returns a number object representing i valuei0  of the type b floatb0 .
fi-6552 fs16 
fs28 fi-6552 + (NSNumber *)b numberWithInt:b0 (int)i valuei0 tab Creates and returns a number object representing i valuei0  of the type b intb0 .
fi-6552 fs16 
fs28 fi-6552 + (NSNumber *)b numberWithLong:b0 (long)i valuei0 tab Creates and returns a number object representing i valuei0  of the type b longb0 .
fi-6552 fs16 
fs28 fi-6552 + (NSNumber *)b numberWithLongLong:b0 (long long)i value
s9 li7030 fi-6553 fi-5796 i0 tab Creates and returns a number object representing i valuei0  of the type b long longb0 .
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 + (NSNumber *)b numberWithShort:b0 (short)i valuei0 tab Creates and returns a number object representing i valuei0  of the type b shortb0 .
fi-6552 fs16 
fs28 fi-6552 + (NSNumber *)b numberWithUnsignedChar:b0 (unsigned char)i value
s9 li7030 fi-6553 fi-5796 i0 tab Creates and returns a number object representing i valuei0  of the type b unsigned charb0 .
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 + (NSNumber *)b numberWithUnsignedInt:b0 (unsigned int)i value
s9 li7030 fi-6553 fi-5796 i0 tab Creates and returns a number object representing i valuei0  of the type b unsigned intb0 .
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 + (NSNumber *)b numberWithUnsignedLong:b0 (unsigned long)i value
s9 li7030 fi-6553 fi-5796 i0 tab Creates and returns a number object representing i valuei0  of the type b unsigned longb0 .
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 + (NSNumber *)b numberWithUnsignedLongLong:b0 (unsigned long long)i value
s9 li7030 fi-6553 fi-5796 i0 tab Creates and returns a number object representing i valuei0  of the type b unsigned long longb0 .
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 + (NSNumber *)b numberWithUnsignedShort:b0 (unsigned short)i value
s9 li7030 fi-6553 fi-5796 i0 tab Creates and returns a number object representing i valuei0  of the type b unsigned shortb0 .
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Accessing Data 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (BOOL)b boolValueb0 tab Returns the receiver'27s value as a boolean value.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (char)b charValueb0 tab Returns the receiver'27s value as a character value.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (double)b doubleValueb0 tab Returns the receiver'27s value as a double precision floating point value.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (float)b floatValueb0 tab Returns the receiver'27s value as a single precision floating point value.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (int)b intValueb0 tab Returns the receiver'27s value as a integer value.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (long long)b longLongValueb0 tab Returns the receiver'27s value as a long long double precision floating point value.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (long)b longValueb0 tab Returns the receiver'27s value as a long double precision floating point value.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (short)b shortValueb0 tab Returns the receiver'27s value as a short integer value.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSString *)b stringValueb0 tab Returns the receiver'27s value as a string contained in an NSString object.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (unsigned char)b unsignedCharValueb0 tab Returns the receiver'27s value as an unsigned character value.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (unsigned int)b unsignedIntValueb0 tab Returns the receiver'27s value as an unsigned integer value.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (unsigned long long)b unsignedLongLongValueb0 tab Returns the receiver'27s value as an unsigned long long double precision floating point value.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (unsigned long)b unsignedLongValueb0 tab Returns the receiver'27s value as an unsigned long double precision floating point value.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (unsigned short)b unsignedShortValueb0 tab Returns the receiver'27s value as an unsigned short integer value.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Comparing Data 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (NSComparisonResult)b compare:b0 (NSNumber *)i otherNumber
s9 li7030 fi-6553 fi-5796 i0 tab Compares the receiver to i otherNumberi0 , using ANSI C rules for type coersion, and returns an NSComparisonResult.
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.