This implementation iterates over the queue looking for the * specified element. If it finds the element, it removes the element * from the queue using the iterator's remove method.
*
*/
public boolean remove(Object o) {
lock.lock();
try {
return q.remove(o);
}
finally {
lock.unlock();
}
}
/**
* Returns an iterator over the elements in this queue. The iterator
* does not return the elements in any particular order. The
* returned iterator is a "fast-fail" iterator that will
* throw {@link java.util.ConcurrentModificationException}
* upon detected interference.
*
* @return an iterator over the elements in this queue.
*/
public Iterator