objc

Instance Methods | Class Methods
NXNumber Class Reference

The base class for NXNumber instances. More...

#import <Foundation/Foundation.h>

Inheritance diagram for NXNumber:
Inheritance graph
[legend]
Collaboration diagram for NXNumber:
Collaboration graph
[legend]

Instance Methods

(BOOL- boolValue
 Returns the boolean value stored in this NXNumber instance. More...
 
(int16_t) - int16Value
 Returns the 16-bit signed integer value stored in this NXNumber instance. More...
 
(uint16_t) - unsignedInt16Value
 Returns the 16-bit unsigned integer value stored in this NXNumber instance. More...
 
(int32_t) - int32Value
 Returns the 32-bit signed integer value stored in this NXNumber instance. More...
 
(uint32_t) - unsignedInt32Value
 Returns the 32-bit unsigned integer value stored in this NXNumber instance. More...
 
(int64_t) - int64Value
 Returns the 64-bit signed integer value stored in this NXNumber instance. More...
 
(uint64_t) - unsignedInt64Value
 Returns the 64-bit unsigned integer value stored in this NXNumber instance. More...
 
- Instance Methods inherited from NXObject
(id- retain
 Increases the retain count of the receiver. More...
 
(void) - release
 Decreases the retain count of the receiver. More...
 
(id- autorelease
 Adds the receiver to the autorelease pool.
 
- Instance Methods inherited from Object
(void) - dealloc
 Free resources for an existing instance.
 
(id- init
 Initialize the instance, after allocation. More...
 
(Class- class
 Returns the class of the instance. More...
 
(Class- superclass
 Returns the superclass of the instance. More...
 
(BOOL- isEqual:
 Compares the receiver to another object for equality. More...
 
(BOOL- isKindOfClass:
 Returns a Boolean value that indicates whether the receiver is an instance of a given class. More...
 
(BOOL- conformsTo:
 Checks if the receiver's class conforms to a protocol. More...
 
(NXString *) - description
 Returns a string that represents the instance. More...
 
- Instance Methods inherited from <ObjectProtocol>
(BOOL- respondsToSelector:
 Checks if the receiver responds to a selector. More...
 
- Instance Methods inherited from <JSONProtocol>
(NXString *) - JSONString
 Returns a JSON representation of the instance. More...
 
(size_t) - JSONBytes
 Returns the appropriate capacity for the JSON representation of the instance. More...
 

Class Methods

(NXNumber *) + numberWithBool:
 Creates a new NXNumber instance with a boolean value. More...
 
(NXNumber *) + numberWithInt16:
 Creates a new NXNumber instance with a 16-bit signed integer value. More...
 
(NXNumber *) + numberWithUnsignedInt16:
 Creates a new NXNumber instance with an unsigned 16-bit integer value. More...
 
(NXNumber *) + numberWithInt32:
 Creates a new NXNumber instance with a 32-bit signed integer value. More...
 
(NXNumber *) + numberWithUnsignedInt32:
 Creates a new NXNumber instance with an unsigned 32-bit integer value. More...
 
(NXNumber *) + numberWithInt64:
 Creates a new NXNumber instance with a 64-bit signed integer value. More...
 
(NXNumber *) + numberWithUnsignedInt64:
 Creates a new NXNumber instance with an unsigned 64-bit integer value. More...
 
(NXNumber *) + trueValue
 Returns a NXNumber instance representing the boolean value true. More...
 
(NXNumber *) + falseValue
 Returns a NXNumber instance representing the boolean value false. More...
 
(NXNumber *) + zeroValue
 Return an instance of a zero value. More...
 
- Class Methods inherited from NXObject
(id+ allocWithZone:
 Allocates a new instance of an object in a specific memory zone. More...
 
- Class Methods inherited from Object
(void) + initialize
 Performs one-time initialization for the class. More...
 
(id+ alloc
 Allocate a new class instance. More...
 
(Class+ class
 Returns the class object. More...
 
(Class+ superclass
 Returns the superclass of the class. More...
 
(const char *) + name
 Returns the name of the class. More...
 
(BOOL+ conformsTo:
 Checks if the class conforms to a protocol. More...
 
(NXString *) + description
 Returns a string that represents the class. More...
 

Additional Inherited Members

- Protected Attributes inherited from NXObject
id _zone
 The memory zone where the object is allocated.
 
unsigned short _retain
 The retain count of the object.
 
id _next
 The next object in an autorelease pool.
 
- Protected Attributes inherited from Object
Class isa
 A pointer to the object's class structure. More...
 

Detailed Description

The base class for NXNumber instances.

NXNumber represents a numeric value in the Foundation framework.

Definition at line 47 of file NXNumber.h.

Method Documentation

◆ boolValue()

- (BOOL) boolValue

Returns the boolean value stored in this NXNumber instance.

Returns
The boolean value stored in this instance.

This method returns YES if the stored value is non-zero, NO otherwise.

◆ falseValue()

+ (NXNumber *) falseValue

Returns a NXNumber instance representing the boolean value false.

Returns
A NXNumber instance with the value false.

◆ int16Value()

- (int16_t) int16Value

Returns the 16-bit signed integer value stored in this NXNumber instance.

Returns
The 16-bit signed integer value stored in this instance.

◆ int32Value()

- (int32_t) int32Value

Returns the 32-bit signed integer value stored in this NXNumber instance.

Returns
The 32-bit signed integer value stored in this instance.

◆ int64Value()

- (int64_t) int64Value

Returns the 64-bit signed integer value stored in this NXNumber instance.

Returns
The 64-bit signed integer value stored in this instance.

◆ numberWithBool:()

+ (NXNumber *) numberWithBool: (BOOL value

Creates a new NXNumber instance with a boolean value.

Parameters
valueThe boolean value to wrap in the number instance.
Returns
A new NXNumber instance containing the value.

◆ numberWithInt16:()

+ (NXNumber *) numberWithInt16: (int16_t)  value

Creates a new NXNumber instance with a 16-bit signed integer value.

Parameters
valueThe 16-bit signed integer value to wrap in the number instance.
Returns
A new NXNumber instance containing the value.

◆ numberWithInt32:()

+ (NXNumber *) numberWithInt32: (int32_t)  value

Creates a new NXNumber instance with a 32-bit signed integer value.

Parameters
valueThe 32-bit signed integer value to wrap in the number instance.
Returns
A new NXNumber instance containing the value.

◆ numberWithInt64:()

+ (NXNumber *) numberWithInt64: (int64_t)  value

Creates a new NXNumber instance with a 64-bit signed integer value.

Parameters
valueThe 64-bit signed integer value to wrap in the number instance.
Returns
A new NXNumber instance containing the value.

◆ numberWithUnsignedInt16:()

+ (NXNumber *) numberWithUnsignedInt16: (uint16_t)  value

Creates a new NXNumber instance with an unsigned 16-bit integer value.

Parameters
valueThe 16-bit unsigned integer value to wrap in the number instance.
Returns
A new NXNumber instance containing the value.

◆ numberWithUnsignedInt32:()

+ (NXNumber *) numberWithUnsignedInt32: (uint32_t)  value

Creates a new NXNumber instance with an unsigned 32-bit integer value.

Parameters
valueThe 32-bit unsigned integer value to wrap in the number instance.
Returns
A new NXNumber instance containing the value.

◆ numberWithUnsignedInt64:()

+ (NXNumber *) numberWithUnsignedInt64: (uint64_t)  value

Creates a new NXNumber instance with an unsigned 64-bit integer value.

Parameters
valueThe 64-bit unsigned integer value to wrap in the number instance.
Returns
A new NXNumber instance containing the value.

◆ trueValue()

+ (NXNumber *) trueValue

Returns a NXNumber instance representing the boolean value true.

Returns
A NXNumber instance with the value true.

◆ unsignedInt16Value()

- (uint16_t) unsignedInt16Value

Returns the 16-bit unsigned integer value stored in this NXNumber instance.

Returns
The 16-bit unsigned integer value stored in this instance.

◆ unsignedInt32Value()

- (uint32_t) unsignedInt32Value

Returns the 32-bit unsigned integer value stored in this NXNumber instance.

Returns
The 32-bit unsigned integer value stored in this instance.

◆ unsignedInt64Value()

- (uint64_t) unsignedInt64Value

Returns the 64-bit unsigned integer value stored in this NXNumber instance.

Returns
The 64-bit unsigned integer value stored in this instance.

◆ zeroValue()

+ (NXNumber *) zeroValue

Return an instance of a zero value.

Returns
A statically allocated NXNumber instance representing zero.

The documentation for this class was generated from the following file: