code: public static MultiLineString removeCoordinates(MultiLineString g) {
          ArrayList<LineString> lines = new ArrayList<LineString>();
          for (int i = 0; i < g.getNumGeometries(); i++) {
              LineString line = (LineString) g.getGeometryN(i);
              lines.add(removeCoordinates(line));
          }
          return FACTORY.createMultiLineString(GeometryFactory.toLineStringArray(lines));
      }
docs: Removes duplicated coordinates in a MultiLineString.
  
  @param g
  @return