Foxit PDF RDK

Public Member Functions | List of all members
Int32Array Class Reference
Inheritance diagram for Int32Array:

## Public Member Functions
| Add (newElement)
| Add an element at the tail. Potentially growing the array. More...
| constructor ()
| Constructor.
| Find (data, iStart)
| Find an element from specified position to last. More...
| GetAt (nIndex)
| This method retrieves an element specified by an index number. More...
| GetSize ()
| Get the number of elements in the array. More...
| GetUpperBound ()
| Get the upper bound in the array, actually the maximum valid index. More...
| InsertAt (nIndex, newElement, nCount)
| Inset one or more continuous element at specified position. More...
| InsertAt (nStartIndex, pNewArray)
| Inset an array at specified position. More...
| RemoveAll ()
| Clean up the array. More...
| RemoveAt (nIndex, nCount)
| Remove a number of elements at specified position. More...
| SetAt (nIndex, newElement)
| This method overwrites an element specified by an index number. More...
| SetAtGrow (nIndex, newElement)
| Set an element value at specified position. Potentially growing the array. More...
| SetSize (nNewSize, nGrowBy)
| Change the allocated size and the grow amount. More...
Public Member Functions inherited from NativeObjectWrapper
| constructor (r)
| GetPointerAsNumber ()

## Detailed Description

Examples
  /Users/ec2-user/gitlab-runner/builds/E-xKdhDo/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.

## Member Function Documentation

## ◆ Add()

Int32Array.Add | ( | newElement |  | ) |

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

Parameters

  [in] | newElement | The input element.

Returns
  true means success, while false means failure (such as memory error).

## ◆ Find()

Int32Array.Find | ( | data | ,
|  | iStart |
| ) |  |

Find an element from specified position to last.

Parameters

  [in] | data | The input element.
  [in] | iStart | Specifies the zero-based index of start element to find.

Returns
  An index of the found element. -1 means found none.

## ◆ GetAt()

Int32Array.GetAt | ( | nIndex |  | ) |

This method retrieves an element specified by an index number.

Parameters

  [in] | nIndex | Specifies the zero-based index of the element.

Returns
  An element.

## ◆ GetSize()

Int32Array.GetSize | ( |  | ) |

Get the number of elements in the array.

Returns
  The number of elements in the array.

## ◆ GetUpperBound()

Int32Array.GetUpperBound | ( |  | ) |

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

Returns
  The upper bound.

## ◆ InsertAt() [1/2]

Int32Array.InsertAt | ( | nIndex | ,
|  | newElement | ,
|  | nCount |
| ) |  |

Inset one or more continuous element at specified position.

Parameters

  [in] | nIndex | Specifies the zero-based index in the array.
  [in] | newElement | Specifies the element value to insert.
  [in] | nCount | Specifies the count of the element to insert.

Returns
  true means success, while false means failure (such as parameter or memory error).

## ◆ InsertAt() [2/2]

Int32Array.InsertAt | ( | nStartIndex | ,
|  | pNewArray |
| ) |  |

Inset an array at specified position.

Parameters

  [in] | nStartIndex | Specifies the zero-based index of start element to insert at.
  [in] | pNewArray | The input array.

Returns
  true means success, while false means failure (such as parameter or memory error).

## ◆ RemoveAll()

Int32Array.RemoveAll | ( |  | ) |

Clean up the array.

Returns
  None.

## ◆ RemoveAt()

Int32Array.RemoveAt | ( | nIndex | ,
|  | nCount |
| ) |  |

Remove a number of elements at specified position.

Parameters

  [in] | nIndex | Specifies the zero-based index in the array.
  [in] | nCount | Specifies the count of element to remove.

Returns
  true means success, while false means failure (such as parameter or memory error).

## ◆ SetAt()

Int32Array.SetAt | ( | nIndex | ,
|  | newElement |
| ) |  |

This method overwrites an element specified by an index number.

Parameters

  [in] | nIndex | Specifies the zero-based index of the element.
  [in] | newElement | An element.

Returns
  true means success, while false means failure.

## ◆ SetAtGrow()

Int32Array.SetAtGrow | ( | nIndex | ,
|  | newElement |
| ) |  |

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

Parameters

  [in] | nIndex | Specifies the zero-based index of element in the array.
  [in] | newElement | The input element.

Returns
  true means success, while false means failure.

## ◆ SetSize()

Int32Array.SetSize | ( | nNewSize | ,
|  | nGrowBy |
| ) |  |

Change the allocated size and the grow amount.

Parameters

  [in] | nNewSize | The new size in elements expected.
  [in] | nGrowBy | The grow amount in elements expected. This can be -1 for the grow amount unchanged.

Returns
  true means success, while false means failure (such as parameter or memory error).