public Builder measurementMappings(Map<String,String> measurementMappings){
  Map<String,Pattern> mappingsByPattern=new HashMap<String,Pattern>();
  for (  Map.Entry<String,String> entry : measurementMappings.entrySet()) {
    try {
      final Pattern pattern=Pattern.compile(entry.getValue());
      mappingsByPattern.put(entry.getKey(),pattern);
    }
 catch (    PatternSyntaxException e) {
      throw new RuntimeException("Could not compile regex: " + entry.getValue(),e);
    }
  }
  this.measurementMappings=mappingsByPattern;
  return this;
}

public Builder measurementMappings ( Map < String , String > measurementMappings ) { Map < String , Pattern > mappingsByPattern = new HashMap < String , Pattern > ( ) ; for ( Map . Entry < String , String > entry : measurementMappings . entrySet ( ) ) { try { final Pattern pattern = Pattern . compile ( entry . getValue ( ) ) ; mappingsByPattern . put ( entry . getKey ( ) , pattern ) ; } catch ( PatternSyntaxException e ) { throw new RuntimeException ( "Could not compile regex: " + entry . getValue ( ) , e ) ; } } this . measurementMappings = mappingsByPattern ; return this ; }
map measurement to a defined measurement name , where the key is the measurement name and the value is the reqex the measurement should be mapped by .
