code: private int searchInternal(Composite name, int startIdx)
      {
          if (isEmpty())
              return -1;
  
          int pos = Arrays.binarySearch(starts, startIdx, size, name, comparator);
          if (pos >= 0)
          {
              // We're exactly on an interval start. The one subtility is that we need to check if
              // the previous is not equal to us and doesn't have a higher marked at
              if (pos > 0 && comparator.compare(name, ends[pos-1]) == 0 && markedAts[pos-1] > markedAts[pos])
                  return pos-1;
              else
                  return pos;
          }
          else
          {
              // We potentially intersect the range before our "insertion point"
              int idx = -pos-2;
              if (idx < 0)
                  return -1;
  
              return comparator.compare(name, ends[idx]) <= 0 ? idx : -idx-2;
          }
      }
docs: /*
  Return is the index of the range covering name if name is covered. If the return idx is negative,
  no range cover name and -idx-1 is the index of the first range whose start is greater than name.