publicvoidput(Ee){offer(e);neverneedtoblock}publicbooleanoffer(Ee){if(enull)thrownewNullPointerException();finalReentrantLocklockthis.lock;lock.lock();intn,cap;Object[]array;while((nsize)>(cap(arrayqueue).length))tryGrow(array,cap);try{Comparator<superE>cmpcomparator;if(cmpnull)siftUpComparable(n,e,array);elsesiftUpUsingComparator(n,e,array,cmp);sizen+1;notEmpty.signal();}finally{lock.unlock();...