code: public CompoundCurve toCompoundCurve(List<Polyline> polylineList,
                                           boolean hasZ, boolean hasM) {
  
          CompoundCurve compoundCurve = new CompoundCurve(hasZ, hasM);
  
          for (Polyline polyline : polylineList) {
              LineString lineString = toLineString(polyline);
              compoundCurve.addLineString(lineString);
          }
  
          return compoundCurve;
      }
docs: Convert a list of {@link Polyline} to a {@link CompoundCurve}
  
  @param polylineList polyline list
  @param hasZ         has z flag
  @param hasM         has m flag
  @return compound curve