JsArray
Date: 2012-06-29

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.chromium.sdk
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.chromium.sdk.JsValue
`JsValue.ReloadBiggerCallback, JsValue.Type`

Method Summary
`JsVariable` | `get(int index)`
`int` | `length()`
`java.util.SortedMap<java.lang.Integer,? extends JsVariable>` | `toSparseArray()`

Methods inherited from interface org.chromium.sdk.JsObject
`asArray, asFunction, getClassName, getInternalProperties, getProperties, getProperty, getRefId, getRemoteValueMapping`

Methods inherited from interface org.chromium.sdk.JsValue
`asObject, getType, getValueString, isTruncated, reloadHeavyValue`

Method Detail

### length

    int length()
               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(int 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.Integer,? 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD