Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/utils/Formatter.java @ 8862:5b5bdce5a216
Introduced new number formats for some new data types
Also using varargs in msg helper methods
author | gernotbelger |
---|---|
date | Fri, 19 Jan 2018 18:47:18 +0100 |
parents | 5e38e2924c07 |
children | 322b0e6298ea |
comparison
equal
deleted
inserted
replaced
8861:571e5287dfbb | 8862:5b5bdce5a216 |
---|---|
487 | 487 |
488 public static DateFormat getDateFormatter(CallMeta m, String pattern) { | 488 public static DateFormat getDateFormatter(CallMeta m, String pattern) { |
489 Locale locale = Resources.getLocale(m); | 489 Locale locale = Resources.getLocale(m); |
490 return new SimpleDateFormat(pattern, locale); | 490 return new SimpleDateFormat(pattern, locale); |
491 } | 491 } |
492 | |
493 public static NumberFormat getMeanBedHeight(CallContext context) { | |
494 return Formatter.getFormatter(context, 2, 2); | |
495 } | |
496 | |
497 public static NumberFormat getTkh(CallContext context) { | |
498 return Formatter.getFormatter(context, 1, 1); | |
499 } | |
500 | |
501 public static NumberFormat getFlowDepth(CallContext context) { | |
502 return Formatter.getFormatter(context, 2, 2); | |
503 } | |
504 | |
505 public static NumberFormat getW(CallContext context) { | |
506 return Formatter.getFormatter(context, 2, 2); | |
507 } | |
508 | |
509 /** | |
510 * Another waterlevel formatter with fixed digits (always 2) | |
511 */ | |
512 public static NumberFormat getWaterlevelW2(CallMeta meta) { | |
513 return getFormatter( meta, 2, 2); | |
514 } | |
492 } | 515 } |
493 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 516 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |