public E remove(){
  E o=poll();
  if (null == o) {
    throw new NoSuchElementException();
  }
  return o;
}

public E remove ( ) { E o = poll ( ) ; if ( null == o ) { throw new NoSuchElementException ( ) ; } return o ; }
removes the element at the head of the queue and returns it .
