org.eclipse.wst.jsdt.chromium

## Interface JsArray

All Superinterfaces:
  JsObject, JsValue

    public interface JsArray
    extends JsObject

Extends `JsObject` interface by adding methods for handling array elements.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.eclipse.wst.jsdt.chromium.JsValue

`JsValue.ReloadBiggerCallback, JsValue.Type`

### Method Summary

All Methods Instance Methods Abstract Methods
`JsVariable` `get(long index)`
`long` `getLength()`
`java.util.SortedMap<java.lang.Long,? extends JsVariable>` `toSparseArray()`

### Methods inherited from interface org.eclipse.wst.jsdt.chromium.JsObject

`asArray, asFunction, getClassName, getInternalProperties, getProperties, getProperty, getRefId, getRemoteValueMapping`

### Methods inherited from interface org.eclipse.wst.jsdt.chromium.JsValue

`asObject, getType, getValueString, isTruncated, reloadHeavyValue`

### Method Detail

#### getLength

    long getLength()
            throws MethodIsBlockingException

Returns:
  the array length (index of the last element plus one), 0 iff the array is empty
Throws:
  `MethodIsBlockingException` - because it may need to load value from remote

#### get

    JsVariable get(long index)
            throws MethodIsBlockingException

Parameters:
  `index` - in the array
Returns:
  a `JsVariable` at the `index`, or `null` if there is no value at the specified index in the array
Throws:
  `MethodIsBlockingException` - because it may need to load value from remote

#### toSparseArray

    java.util.SortedMap<java.lang.Long,? extends JsVariable> toSparseArray()
                                                                    throws MethodIsBlockingException

Returns:
  a map whose keys are array indices and values are `JsVariable` instances found at the corresponding indices. The resulting map is guaranteed to be sorted in the ascending key order.
Throws:
  `MethodIsBlockingException` - because it may need to load value from remote