/* 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.Queue"); dojo.require("dojo.collections.Collections"); dojo.collections.Queue=function(/* array? */arr){ // summary // return an object of type dojo.collections.Queue var q=[]; if (arr){ q=q.concat(arr); } this.count=q.length; this.clear=function(){ // summary // clears the internal collection q=[]; this.count=q.length; }; this.clone=function(){ // summary // creates a new Queue based on this one return new dojo.collections.Queue(q); // dojo.collections.Queue }; this.contains=function(/* object */ o){ // summary // Check to see if the passed object is an element in this queue for(var i=0; i