             return (a.priority > b.priority) ? -1 : 1;
         }
 
+        //------------------------------------------------------------
+        // debug
+        //------------------------------------------------------------
+
+        public function dumpPriority():void {
+            var priorities:Array = [];
+            for each (var item:PriorityNode in _queue) {
+                priorities.push(item.priority);
+            }
+            trace(" -", priorities);
+        }
+
     }
 }
 

            var pNode:PriorityNode = new PriorityNode(priority, item);
            _queue.push(pNode);
            _isDirty = true;
        }

        /**


        private var _queue:Vector.<PriorityNode>;
        private var _isDirty:Boolean;

        public var verbose:Boolean = false;

        //------------------------------------------------------------
        public function PriorityQueue() {
