f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce * Adds methods promote, remove, and indexOf to Queue instances.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce * @module queue-promote
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce * Returns the current index in the queue of the specified item
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce * @method indexOf
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce * @param needle {MIXED} the item to search for
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce * @return {Number} the index of the item or -1 if not found
fcc9f7f86c2fa2ceb8a5c16dc934fea7fa6887f2Andreas Gustafsson return Y.Array.indexOf(this._q, callback);
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce * Moves the referenced item to the head of the queue
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce * @method promote
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce * @param item {MIXED} an item in the queue
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce * Removes the referenced item from the queue
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce * @method remove
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce * @param item {MIXED} an item in the queue