code: public int ENgetlinkindex( String id ) throws EpanetException {
          int[] index = new int[1];
          int error = epanet.ENgetlinkindex(id, index);
          checkError(error);
          return index[0];
      }
docs: Retrieves the index of a link with a specified ID.
  
  <p>Link indexes are consecutive integers starting from 1.
  
  @param id link ID label.
  @return the link index.
  @throws EpanetException