Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/utils/Formatter.java Fri Jan 19 18:46:20 2018 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/utils/Formatter.java Fri Jan 19 18:47:18 2018 +0100 @@ -489,5 +489,28 @@ Locale locale = Resources.getLocale(m); return new SimpleDateFormat(pattern, locale); } + + public static NumberFormat getMeanBedHeight(CallContext context) { + return Formatter.getFormatter(context, 2, 2); + } + + public static NumberFormat getTkh(CallContext context) { + return Formatter.getFormatter(context, 1, 1); + } + + public static NumberFormat getFlowDepth(CallContext context) { + return Formatter.getFormatter(context, 2, 2); + } + + public static NumberFormat getW(CallContext context) { + return Formatter.getFormatter(context, 2, 2); + } + + /** + * Another waterlevel formatter with fixed digits (always 2) + */ + public static NumberFormat getWaterlevelW2(CallMeta meta) { + return getFormatter( meta, 2, 2); + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :