code: protected int indexOf(final Object o) {
          final int size = dataModel.getSize();
          for (int i = 0; i < size; i++) {
              if (comparator == null) {
                  if (o.equals(dataModel.getElementAt(i))) {
                      return i;
                  }
              } else if (comparator.compare(o, dataModel.getElementAt(i)) == 0) {
                  return i;
              }
          }
  
          return -1;
      }
docs: Get the index of a given object in the underlying data model.
  
  @param o Object to locate
  @return index of object in model, -1 if not found