code: public void add(E element) throws IllegalStateException {
  		requireNonNull(element);
  
  		lock.lock();
  		try {
  			if (open) {
  				elements.addLast(element);
  				if (elements.size() == 1) {
  					nonEmpty.signalAll();
  				}
  			} else {
  				throw new IllegalStateException("queue is closed");
  			}
  		} finally {
  			lock.unlock();
  		}
  	}
docs: Adds the element to the queue, or fails with an exception, if the queue is closed.
  Checking whether the queue is open and adding the element is one atomic operation.
  
  @param element The element to add.
  @throws IllegalStateException Thrown, if the queue is closed.