public WeightingConfig createWeightingConfig ( PMap pMap ) { HashMap < String , Double > map = new HashMap <> ( DEFAULT_SPEEDS . size ( ) ) ; for ( Entry < String , Double > e : DEFAULT_SPEEDS . entrySet ( ) ) { map . put ( e . getKey ( ) , pMap . getDouble ( e . getKey ( ) , e . getValue ( ) ) ) ; } return new WeightingConfig ( getHighwaySpeedMap ( map ) ) ; }
This method creates a Config map out of the PMap . Later on this conversion should not be necessary when we read JSON .