static JmxMeasurementConfig from ( Config config ) { String name = config . getString ( "name" ) ; Map < String , String > tags = config . getConfigList ( "tags" ) . stream ( ) . collect ( Collectors . toMap ( c -> c . getString ( "key" ) , c -> c . getString ( "value" ) ) ) ; String value = config . getString ( "value" ) ; boolean counter = config . hasPath ( "counter" ) && config . getBoolean ( "counter" ) ; return new JmxMeasurementConfig ( name , tags , value , counter ) ; }
Create from a Typesafe Config object .