public boolean offer ( E e ) { if ( e == null ) throw new NullPointerException ( ) ; modCount ++ ; int i = size ; if ( i >= queue . length ) grow ( i + 1 ) ; size = i + 1 ; if ( i == 0 ) queue [ 0 ] = e ; else siftUp ( i , e ) ; return true ; }
Inserts the specified element into this priority queue .