public synchronized T getNonBlocking ( ) { if ( _count == 0 ) { return null ; } // pull the object off, and clear our reference to it T retval = _items [ _start ] ; _items [ _start ] = null ; _start = ( _start + 1 ) % _size ; _count -- ; return retval ; }
Returns the next item on the queue or null if the queue is empty . This method will not block waiting for an item to be added to the queue .