Use $array to create an Array or a HashSet instance.
$array.createArray()
Create an empty ArrayList.
Name | Type | Description | |
---|---|---|---|
Parameter(s) | - | - | - |
Return | - | java.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. |
Return | - | java.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. |
size | int | A view size of a given list. | |
Return | - | java.util.List | An 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. |
child | java.util.Collection | A child collection. | |
Return | - | void |
$array.createHashSet()
Create a HashSet instance.
Name | Type | Description | |
---|---|---|---|
Parameter(s) | - | - | - |
Return | - | java.util.Set | An instance of HashSet. |