code: public LinkTypes ENgetlinktype( int index ) throws EpanetException {
          int[] typecode = new int[1];
          int error = epanet.ENgetlinktype(index, typecode);
          checkError(error);
  
          LinkTypes type = LinkTypes.forCode(typecode[0]);
          return type;
      }
docs: Retrieves the link-type code for a specific link.
  
  @param index link index.
  @return the {@link LinkTypes}.
  @throws EpanetException