# Class: ArrayList

## jala.ListRenderer.ArrayList(arr, offset, total)

A simple wrapper around an array to use in conjunction with jala.ListRenderer. This wrapper can either handle complete arrays or subsections of an array. In the latter case the wrapper needs offset and total size information as argument to mimick a complete array.

## Constructor

#### new ArrayList(arr, offset, total)

Creates a new ArrayList instance.

##### Parameters:

Name | Type | Description
--- | --- | ---
`arr` | Array | The array (or a subsection of an array) to wrap
`offset` | Number | An optional offset to use (mandatory if the array is just a subsection).
`total` | Number | An optional total size of the array. This argument is mandatory if the wrapped array is just a subsection.

Source:
  - jala/code/ListRenderer.js, line 1066

##### Returns:

A newly created ArrayList instance

### Members

#### length :Number

The length of this ArrayList instance.

##### Type:

- Number

Source:
  - jala/code/ListRenderer.js, line 1079

#### offset :Number

The offset of this ArrayList instance. This might be > zero for ArrayList instances wrapping just a subsection, that is mimicking a bigger list.

##### Type:

- Number

Source:
  - jala/code/ListRenderer.js, line 1073

### Methods

#### get(idx)

Returns the element at the index position passed as argument. If the wrapped array is just a subsection the index position passed will be corrected using the offset.

##### Parameters:

Name | Type | Description
--- | --- | ---
`idx` | Number | The index position of the element to return

Source:
  - jala/code/ListRenderer.js, line 1090

##### Returns:

The element at the given index position

#### isSubset()

Returns true if this ArrayList is a subsection of a bigger array

Source:
  - jala/code/ListRenderer.js, line 1111

##### Returns:

True if this ArrayList is a subsection of a bigger array

#### size()

Returns the size of this ArrayList, which is either the length of the wrapped array or the total size passed as argument to the constructor (in case the wrapped array is just a subsection).

Source:
  - jala/code/ListRenderer.js, line 1102

##### Returns:

The size of this ArrayList instance

#### subsetSize()

Returns the actual size of this ArrayList's wrapped array.

Source:
  - jala/code/ListRenderer.js, line 1120

##### Returns:

The actual size of this ArrayList's wrapped array.