@SuppressWarnings("unchecked")
    private T dequeue() {
        T t = (T)items[takeIndex];
        items[takeIndex] = null;
        if(++takeIndex == items.length) { 
            takeIndex = 0;
        }
        count--;
        return t;
    }
Offer item to queue. If queue is full wait with timeout till space is available.
@param t - item to offer
@param timeout - time out time
@param timeUnit - time out unit
@return - returns true if item was offered in queue successfully else false.
@throws InterruptedException
src/com/interview/multithreaded/BoundedBlockingQueue.java