code: public int getIndex(String name) {
          for (int i = 0; i < configs.length; i++) {
              Provider p = getProvider(i);
              if (p.getName().equals(name)) {
                  return i;
              }
          }
          return -1;
      }
docs: Return the index at which the provider with the specified name is
  installed or -1 if it is not present in this ProviderList.