On this page

Use $array to create an Array or a HashSet instance.

$array.createArray()

Create an empty ArrayList.


Name Type Description 
Parameter(s) -
Returnjava.util.List An instance of
ArrayList. 


$array.createArray(collection)

Construct an ArrayList containing elements of the specified collection, in the order they are returned by the collection's iterator. Return a zero size ArrayList if the given collection is null.


Name Type Description 
Parameter(s) collection java.util.Collection A collection of instances
whose elements are to
be placed into a list.
 Returnjava.util.List An ArrayList containing
elements of the specified
collection.


$array.subList(list, size)

Create an ArrayList of a portion of the list in the given size.


Name Type Description 
Parameter(s) list java.util.List An original
list. 

sizeintA view size of
a given list. 
 Return-java.util.ListAn ArrayList of a
specified view size
within a given list. 


$array.addCollection(parent, child)

Add a child list into a parent collection. It helps the template handle the case where the child is null.


Name Type Description 
Parameter(s) parent java.util.Collection A parent
collection. 

childjava.util.CollectionA child
collection. 
 Return-void 


$array.createHashSet()

Create a HashSet instance.


Name Type Description 
Parameter(s) -
 Return-java.util.SetAn instance
of HashSet.