code: public static MultiLineString reverse3D(MultiLineString multiLineString, String order) {
          int num = multiLineString.getNumGeometries();
          LineString[] lineStrings = new LineString[num];
          for (int i = 0; i < multiLineString.getNumGeometries(); i++) {
              lineStrings[i] = reverse3D((LineString) multiLineString.getGeometryN(i), order);
  
          }
          return FACTORY.createMultiLineString(lineStrings);
      }
docs: Reverses a multilinestring according to z value. If asc : the z first
  point must be lower than the z end point if desc : the z first point must
  be greater than the z end point
  
  @param multiLineString
  @return