Spec-Zone .ru
спецификации, руководства, описания, API
Documentation Contents

Class jlist

Object
   |
   +--jlist

class jlist

Defined in init.js


Constructor Summary
jlist (list)
            Creates a convenient script object to deal with java.util.List instances.
 

Constructor Detail

jlist

jlist(list)
Creates a convenient script object to deal with java.util.List instances. The result script object behaves like an array. For example, scriptObj[index] syntax can be used to access values in the List instance. 'length' field gives size of the List.
Example:
 
    var x = new java.util.ArrayList(4);
    x.add('Java');
    x.add('JavaScript');
    x.add('SQL');
    x.add('XML');

    var y = jlist(x);
    print(y[2]); // prints third element of list
    print(y.length); // prints size of the list

Parameters:
map - java.util.List instance that will be wrapped


Oracle and/or its affiliates Copyright © 1993, 2012, Oracle and/or its affiliates. All rights reserved.
Contact Us