code: public int bufferIndexOf(KType e1) {
      final int last = tail;
      final int bufLen = buffer.length;
      for (int i = head; i != last; i = oneRight(i, bufLen)) {
        if (Intrinsics.equals(this, e1, buffer[i])) {
          return i;
        }
      }
  
      return -1;
    }
docs: Return the index of the first (counting from head) element equal to
  <code>e1</code>. The index points to the {@link #buffer} array.
  
  @param e1
  The element to look for.
  @return Returns the index of the first element equal to <code>e1</code> or
  <code>-1</code> if not found.