Class Collections.Stack

Stack

Class Summary
Constructor Attributes Constructor Name and Description
 
A Stack is a Collection that contains duplicate values.

Method Summary

Class Detail

Collections.Stack()
A Stack is a Collection that contains duplicate values. Last In First Out.
require('Collections').Stack()

Method Detail

  • <static> {Collections.Stack} Collections.Stack.clone()
    returns Collection.Stack a new Stack with the cloned object of the items.
    Returns:
    {Collections.Stack}
  • <static> {boolean} Collections.Stack.isEmpty()
    returns true if teh Stack is empty.
    Returns:
    {boolean}
  • <static> {String} Collections.Stack.objType()
    returns teh Object type as "Stack"
    Returns:
    {String} ObjectType
  • <static> {Object} Collections.Stack.pop()
    removes the top item from teh stacks
    Returns:
    {Object} item
  • <static> {null} Collections.Stack.push(item)
    removes the top item from teh stacks
    Parameters:
    {Object} item
    Returns:
    {null}
  • <static> {String} Collections.Stack.toString()
    returns the JSON data of teh Object
    Returns:
    {String} ObjectType