code: @SuppressWarnings("unchecked")
      public T getItem(int index) {
          int target = head - 1 - index;
          if (target < 0) target = size + target - head;
          return (T) queue[target];
      }
docs: Get the item at a position `n` positions from the head.
  
  @param index of the item to retrieve
  @return the stored item