@Test public void testCorrectScaleFactor_variableNotPresent() { Map<String, VariableDescriptor> variableDescriptors = new HashMap<>(); variableDescriptors.put("_its_here", new VariableDescriptor()); ExporterUtils.correctScaleFactor(variableDescriptors, "the_missing", 2.8); }
static void correctScaleFactor(Map<String, VariableDescriptor> variableDescriptors, String variableName, double scaleCorrection) { final VariableDescriptor variableDescriptor = variableDescriptors.get(variableName); if (variableDescriptor != null) { final double originalScaleFactor = variableDescriptor.getScaleFactor(); variableDescriptor.setScaleFactor(originalScaleFactor * scaleCorrection); } }
ExporterUtils { static void correctScaleFactor(Map<String, VariableDescriptor> variableDescriptors, String variableName, double scaleCorrection) { final VariableDescriptor variableDescriptor = variableDescriptors.get(variableName); if (variableDescriptor != null) { final double originalScaleFactor = variableDescriptor.getScaleFactor(); variableDescriptor.setScaleFactor(originalScaleFactor * scaleCorrection); } } }
ExporterUtils { static void correctScaleFactor(Map<String, VariableDescriptor> variableDescriptors, String variableName, double scaleCorrection) { final VariableDescriptor variableDescriptor = variableDescriptors.get(variableName); if (variableDescriptor != null) { final double originalScaleFactor = variableDescriptor.getScaleFactor(); variableDescriptor.setScaleFactor(originalScaleFactor * scaleCorrection); } }  }
ExporterUtils { static void correctScaleFactor(Map<String, VariableDescriptor> variableDescriptors, String variableName, double scaleCorrection) { final VariableDescriptor variableDescriptor = variableDescriptors.get(variableName); if (variableDescriptor != null) { final double originalScaleFactor = variableDescriptor.getScaleFactor(); variableDescriptor.setScaleFactor(originalScaleFactor * scaleCorrection); } }   }
ExporterUtils { static void correctScaleFactor(Map<String, VariableDescriptor> variableDescriptors, String variableName, double scaleCorrection) { final VariableDescriptor variableDescriptor = variableDescriptors.get(variableName); if (variableDescriptor != null) { final double originalScaleFactor = variableDescriptor.getScaleFactor(); variableDescriptor.setScaleFactor(originalScaleFactor * scaleCorrection); } }    }