Inherits from NSObject
Declared in KKIntegerArray.h

Overview

Wraps a C array of NSUInteger with a slim NSArray type interface.

Properties

count

Number of integers in the array.

@property (atomic, readonly) NSUInteger count

Declared In

KKIntegerArray.h

integers

The integer array as C memory buffer.

@property (atomic, readonly) NSUInteger *integers

Declared In

KKIntegerArray.h

Class Methods

integerArrayWithCapacity:

The initial size of the array.

+ (id)integerArrayWithCapacity:(NSUInteger)capacity

Parameters

capacity

The initial size of the array.

Return Value

A new instance.

Declared In

KKIntegerArray.h

Instance Methods

addInteger:

Adds an integer at the end of the array.

- (void)addInteger:(NSUInteger)integer

Parameters

integer

The integer to add.

Declared In

KKIntegerArray.h

integerAtIndex:

An array index.

- (NSUInteger)integerAtIndex:(NSUInteger)index

Parameters

index

An array index.

Return Value

The integer at the index.

Declared In

KKIntegerArray.h

lastInteger

The last integer in the array. Returns 0 if the array is empty.

- (NSUInteger)lastInteger

Return Value

The last integer in the array. Returns 0 if the array is empty.

Declared In

KKIntegerArray.h

removeAllIntegers

Empties the array.

- (void)removeAllIntegers

Declared In

KKIntegerArray.h