Class Collections.ArrayList

ArrayList

Class Summary
Constructor Attributes Constructor Name and Description
 
An ArrayList is a Collection that contains duplicate values.

Method Summary

Class Detail

Collections.ArrayList()
An ArrayList is a Collection that contains duplicate values.
require('Collections').ArrayList()

Method Detail

  • <static> {null} Collections.ArrayList.add(item)
    insert an Item to the ArrayList, it adds to the last of the array, It allows duplicate values in the list.
    Parameters:
    {Object} item
    Returns:
    {null}
  • <static> {null} Collections.ArrayList.addAll(itemArray)
    insert an array of Items to the ArrayList, it adds to the last of the array, It allows duplicate values in the list.
    Parameters:
    {Object[]} itemArray
    Returns:
    {null}
  • <static> {Collections.ArrayList} Collections.ArrayList.clone()
    returns Collection.ArrayList a new ArrayList with the cloned object of the items.
    Returns:
    {Collections.ArrayList}
  • <static> {boolean} Collections.ArrayList.contains(item)
    returns whether the item present in the ArrayList.
    Parameters:
    {Object} item
    Returns:
    {boolean}
  • <static> {Object} Collections.ArrayList.get(index)
    returns the object at the prvided index.
    Parameters:
    {integer} index
    Returns:
    {Object} item
  • <static> {Object[]} Collections.ArrayList.getElements()
    returns teh Elemnts in the ArrayList
    Returns:
    {Object[]} itemArray
  • <static> {integer} Collections.ArrayList.indexOf(item)
    returns teh index of teh item in the ArrayList, if item not found it returns -1.
    Parameters:
    {Object} item
    Returns:
    {integer}
  • <static> {String} Collections.ArrayList.json()
    returns the JSON string
    Returns:
    {String} json
  • <static> {String} Collections.ArrayList.objType()
    returns teh Object type as "ArrayList"
    Returns:
    {String} ObjectType
  • <static> {null} Collections.ArrayList.remove(item)
    remove an item from the array, then the remaining items will be shifted left, and their index will be reduced by 1.
    Parameters:
    {Object} item
    Returns:
    {null}
  • <static> {null} Collections.ArrayList.set(index, Item)
    set an item at the specified location
    Parameters:
    {integer} index
    {Object} Item
    Returns:
    {null}
  • <static> {integer} Collections.ArrayList.size()
    returns the number of the Elements present in the ArrayList.
    Returns:
    {integer}
  • <static> {String} Collections.ArrayList.toString()
    returns the JSON data of teh Object
    Returns:
    {String} ObjectType