docs: public Weighting createWeighting(HintsMap hintsMap, FlagEncoder encoder, Graph graph) {
          String weightingStr = toLowerCase(hintsMap.getWeighting());
          Weighting weighting = null;
  
          if (encoder.supports(GenericWeighting.class)) {
              weighting = new GenericWeighting((DataFlagEncoder) encoder, hintsMap);
          } else if ("shortest".equalsIgnoreCase(weightingStr)) {
              weighting = new ShortestWeighting(encoder);
          } else if ("fastest".equalsIgnoreCase(weightingStr) || weightingStr.isEmpty()) {
              if (encoder.supports(PriorityWeighting.class))
                  weighting = new PriorityWeighting(encoder, hintsMap);
              else
                  weighting = new FastestWeighting(encoder, hintsMap);
          } else if ("curvature".equalsIgnoreCase(weightingStr)) {
              if (encoder.supports(CurvatureWeighting.class))
                  weighting = new CurvatureWeighting(encoder, hintsMap);
  
          } else if ("short_fastest".equalsIgnoreCase(weightingStr)) {
              weighting = new ShortFastestWeighting(encoder, hintsMap);
          }
  
          if (weighting == null)
              throw new IllegalArgumentException("weighting " + weightingStr + " not supported");
  
          if (hintsMap.has(Routing.BLOCK_AREA)) {
              String blockAreaStr = hintsMap.get(Parameters.Routing.BLOCK_AREA, "");
              GraphEdgeIdFinder.BlockArea blockArea = new GraphEdgeIdFinder(graph, locationIndex).
                      parseBlockArea(blockAreaStr, DefaultEdgeFilter.allEdges(encoder), hintsMap.getDouble("block_area.edge_id_max_area", 1000 * 1000));
              return new BlockAreaWeighting(weighting, blockArea);
          }
  
          return weighting;
      }