code: private int getURLIndex(String url, List<String> urlList) {
          int urlIndex = 0;
          int numURLs = urlList.size();
  
          // get URL index
          if (url != null)
              for (int i = 0; i < numURLs; i++)
                  if ((urlList.get(i)).equalsIgnoreCase(url)) {
                      urlIndex = i;
                      break;
                  }
  
          return urlIndex;
      }
docs: Returns URL index in the URL list.
  
  @param url URL
  @param urlList List of URLs
  @return URL index