@Override public boolean add(E o){
  if (null == o) {
    throw new NullPointerException();
  }
  if (offer(o)) {
    return true;
  }
  throw new IllegalStateException();
}

@ Override public boolean add ( E o ) { if ( null == o ) { throw new NullPointerException ( ) ; } if ( offer ( o ) ) { return true ; } throw new IllegalStateException ( ) ; }
adds an element to the queue .
