comparison artifacts/src/main/java/org/dive4elements/river/utils/Formatter.java @ 8856:5e38e2924c07 3.2.x

Fix code style.
author Tom Gottfried <tom@intevation.de>
date Thu, 18 Jan 2018 20:12:01 +0100
parents 3a0522f1a532
children 5b5bdce5a216
comparison
equal deleted inserted replaced
8855:d7c005e12af0 8856:5e38e2924c07
151 } 151 }
152 152
153 /** 153 /**
154 * Returns a number formatter that uses an exponent after max digits. 154 * Returns a number formatter that uses an exponent after max digits.
155 */ 155 */
156 public static NumberFormat getScientificFormater(CallContext c, int min, int max) { 156 public static NumberFormat getScientificFormater(
157 CallContext c,
158 int min,
159 int max
160 ) {
157 NumberFormat nf = getRawFormatter(c); 161 NumberFormat nf = getRawFormatter(c);
158 if (nf instanceof DecimalFormat) { 162 if (nf instanceof DecimalFormat) {
159 DecimalFormat df = (DecimalFormat)nf; 163 DecimalFormat df = (DecimalFormat)nf;
160 df.applyPattern("0.0E0"); 164 df.applyPattern("0.0E0");
161 df.setMaximumFractionDigits(max); 165 df.setMaximumFractionDigits(max);
405 MIDDLE_BED_HEIGHT_DATAGAP_MIN_DIGITS, 409 MIDDLE_BED_HEIGHT_DATAGAP_MIN_DIGITS,
406 MIDDLE_BED_HEIGHT_DATAGAP_MAX_DIGITS); 410 MIDDLE_BED_HEIGHT_DATAGAP_MAX_DIGITS);
407 } 411 }
408 412
409 413
410 public static NumberFormat getMiddleBedHeightSounding(CallContext context) { 414 public static NumberFormat getMiddleBedHeightSounding(
415 CallContext context
416 ) {
411 return getFormatter( 417 return getFormatter(
412 context, 418 context,
413 MIDDLE_BED_HEIGHT_SOUNDING_WIDTH_MIN_DIGITS, 419 MIDDLE_BED_HEIGHT_SOUNDING_WIDTH_MIN_DIGITS,
414 MIDDLE_BED_HEIGHT_SOUNDING_WIDTH_MAX_DIGITS); 420 MIDDLE_BED_HEIGHT_SOUNDING_WIDTH_MAX_DIGITS);
415 } 421 }

http://dive4elements.wald.intevation.org