Foxit PDF SDK
FSInt32Array Class Reference

An array of integer values.
More...

Inheritance diagram for FSInt32Array:
FSBasicArray

Instance Methods

(BOOL) - add:
 Add an element at the tail. Potentially growing the array.
More...
 
(int) - find:iStart:
 Find an element from specified position to last.
More...
 
(int) - getAt:
 This method retrieves an element specified by an index number.
More...
 
(int) - getSize
 Get the number of elements in the array.
More...
 
(int) - getUpperBound
 Get the upper bound in the array, actually the maximum valid index.
More...
 
(id) - init
 Constructor.
 
(id) - initWithOther:
 Constructor, with another array object. More...
 
(BOOL) - insertAt:newElement:nCount:
 Inset one or more continuous element at specified position.
More...
 
(void) - removeAll
 Clean up the array.
More...
 
(BOOL) - removeAt:nCount:
 Remove a number of elements at specified position.
More...
 
(BOOL) - setAt:newElement:
 This method overwrites an element specified by an index number.
More...
 
(BOOL) - setAtGrow:newElement:
 Set an element value at specified position. Potentially growing the array.
More...
 
(BOOL) - setSize:nGrowBy:
 Change the allocated size and the grow amount.
More...
 

Detailed Description

An array of integer values.

Method Documentation

◆ add:()

- (BOOL) add: (int)  newElement

Add an element at the tail. Potentially growing the array.

Parameters
[in]newElementThe input element.
Returns
YES means success, while NO means failure (such as memory error).

◆ find:iStart:()

- (int) find: (int)  data
iStart: (int)  iStart 

Find an element from specified position to last.

Parameters
[in]dataThe input element.
[in]iStartSpecifies the zero-based index of start element to find.
Returns
An index of the found element. -1 means found none.

◆ getAt:()

- (int) getAt: (int)  nIndex

This method retrieves an element specified by an index number.

Parameters
[in]nIndexSpecifies the zero-based index of the element.
Returns
An element.

◆ getSize()

- (int) getSize

Get the number of elements in the array.

Returns
The number of elements in the array.

◆ getUpperBound()

- (int) getUpperBound

Get the upper bound in the array, actually the maximum valid index.

Returns
The upper bound.

◆ initWithOther:()

- (id) initWithOther: (FSInt32Array*)  other

Constructor, with another array object.

Parameters
[in]otherAnother array object.

◆ insertAt:newElement:nCount:()

- (int) insertAt: (int)  nIndex
newElement: (int)  newElement
nCount: (int)  nCount 

Inset one or more continuous element at specified position.

Parameters
[in]nIndexSpecifies the zero-based index in the array.
[in]newElementSpecifies the element value to insert.
[in]nCountSpecifies the count of the element to insert.
Returns
true means success, while false means failure (such as parameter or memory error).

◆ removeAll()

- (void) removeAll

Clean up the array.

Returns
None.

◆ removeAt:nCount:()

- (BOOL) removeAt: (int)  nIndex
nCount: (int)  nCount 

Remove a number of elements at specified position.

Parameters
[in]nIndexSpecifies the zero-based index in the array.
[in]nCountSpecifies the count of element to remove.
Returns
YES means success, while NO means failure (such as parameter or memory error).

◆ setAt:newElement:()

- (BOOL) setAt: (int)  nIndex
newElement: (int)  newElement 

This method overwrites an element specified by an index number.

Parameters
[in]nIndexSpecifies the zero-based index of the element.
[in]newElementAn element.
Returns
YES means success, while NO means failure.

◆ setAtGrow:newElement:()

- (BOOL) setAtGrow: (int)  nIndex
newElement: (int)  newElement 

Set an element value at specified position. Potentially growing the array.

Parameters
[in]nIndexSpecifies the zero-based index of element in the array.
[in]newElementThe input element.
Returns
YES means success, while NO means failure.

◆ setSize:nGrowBy:()

- (BOOL) setSize: (int)  nNewSize
nGrowBy: (int)  nGrowBy 

Change the allocated size and the grow amount.

Parameters
[in]nNewSizeThe new size in elements expected.
[in]nGrowByThe grow amount in elements expected. This can be -1 for the grow amount unchanged.
Returns
YES means success, while NO means failure (such as parameter or memory error).