# HG changeset patch # User Felix Wolfsteller # Date 1365578838 -7200 # Node ID db4e7ff0b9875560079960a82d0b347683fa9664 # Parent 0ebadc678fbc6db3b2477e00251b63cd34c5db9b Doc and whitespaces. diff -r 0ebadc678fbc -r db4e7ff0b987 flys-artifacts/src/main/java/de/intevation/flys/utils/Formatter.java --- a/flys-artifacts/src/main/java/de/intevation/flys/utils/Formatter.java Wed Apr 10 09:25:19 2013 +0200 +++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/Formatter.java Wed Apr 10 09:27:18 2013 +0200 @@ -10,6 +10,7 @@ import de.intevation.flys.artifacts.resources.Resources; +/** Helper to access static i18n Formatters. */ public final class Formatter { // KMS IN ERROR REPORTS. @@ -78,6 +79,7 @@ public static final int FIX_DELTA_W_DELTA_Q_MIN_DIGITS = 0; public static final int FIX_DELTA_W_DELTA_Q_MAX_DIGITS = 2; + /** * Creates a localized NumberFormatter with given range of decimal digits. * @param m CallMeta to find the locale. @@ -96,6 +98,7 @@ return nf; } + public static NumberFormat getFormatter(CallContext c, int min, int max){ return getFormatter(c.getMeta(), min, max); } @@ -144,6 +147,7 @@ WATERLEVEL_KM_MAX_DIGITS); } + public static NumberFormat getWaterlevelW(CallMeta meta) { return getFormatter( meta, @@ -151,6 +155,7 @@ WATERLEVEL_W_MAX_DIGITS); } + /** * Returns the number formatter for W values in waterlevel exports. * @@ -176,6 +181,7 @@ WATERLEVEL_Q_MAX_DIGITS); } + public static NumberFormat getWaterlevelQ(CallMeta meta) { return getFormatter( meta,