code: private static <C extends Compound> int getIndexOfCompound(List<C> list, C compound) {
  		int index = list.indexOf(compound);
  		if (index == -1) {
  			for (int i = 0; i < list.size(); i++) {
  				if (compound.equalsIgnoreCase(list.get(i))) {
  					index = i;
  					break;
  				}
  			}
  		}
  		return index;
  	}
docs: Returns the index of the first occurrence of the specified element in the list.
  If the list does not contain the given compound, the index of the first occurrence
  of the element according to case-insensitive equality.
  If no such elements exist, -1 is returned.
  @param list list of compounds to search
  @param compound compound to search for
  @return Returns the index of the first match to the specified element in this list, or -1 if there is no such index.