/* Copyright (c) 2004-2006, The Dojo Foundation All Rights Reserved. Licensed under the Academic Free License version 2.1 or above OR the modified BSD license. For more information on Dojo licensing, see: http://dojotoolkit.org/community/licensing.shtml */ dojo.provide("dojo.collections.Stack"); dojo.require("dojo.collections.Collections"); dojo.collections.Stack=function(/* array? */arr){ // summary // returns an object of type dojo.collections.Stack var q=[]; if (arr) q=q.concat(arr); this.count=q.length; this.clear=function(){ // summary // Clear the internal array and reset the count q=[]; this.count=q.length; }; this.clone=function(){ // summary // Create and return a clone of this Stack return new dojo.collections.Stack(q); }; this.contains=function(/* object */o){ // summary // check to see if the stack contains object o for (var i=0; i