Class Collections.Queue

Queue

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

Method Summary

Class Detail

Collections.Queue()
An Queue is a Collection that contains duplicate values. First In First Out.
require('Collections').Queue()

Method Detail

  • <static> {null} Collections.Queue.add(item)
    insert an Item to the Queue, it adds to the last of the array, It allows duplicate values in the list.
    Parameters:
    {Object} item
    Returns:
    {null}
  • <static> {Collections.Queue} Collections.Queue.clone()
    returns Collection.Queue a new Queue with the cloned object of the items.
    Returns:
    {Collections.Queue}
  • <static> {boolean} Collections.Queue.containsKey(item)
    checks whether the provided object exists in the Queue or not.
    Parameters:
    {Object} item
    Returns:
    {boolean}
  • <static> {Object[]} Collections.Queue.getElements()
    returns teh Elemnts in the Queue
    Returns:
    {Object[]} itemArray
  • <static> {boolean} Collections.Queue.isEmpty()
    checks whether any item present in the queue.
    Returns:
    {boolean} isEmpty
  • <static> {String} Collections.Queue.objType()
    returns teh Object type as "Queue"
    Returns:
    {String} ObjectType
  • <static> {Object} Collections.Queue.remove()
    remove an item from Queue
    Returns:
    {Object} item
  • <static> {integer} Collections.Queue.size()
    returns the present size of teh queue.
    Returns:
    {integer} size
  • <static> {String} Collections.Queue.toString()
    returns the JSON data of teh Object
    Returns:
    {String} ObjectType