All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.poznan.put.utility.NumberFormatUtils Maven / Gradle / Ivy

package pl.poznan.put.utility;

import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.NumberFormat;
import java.util.Locale;

/** A class to provide useful NumberFormat instances. */
public final class NumberFormatUtils {
  private static final NumberFormat THREE_DECIMAL_DIGITS =
      new DecimalFormat(".###", new DecimalFormatSymbols(Locale.US));

  private NumberFormatUtils() {
    super();
  }

  /** @return An instance of {@link NumberFormat} with three decimal digits. */
  public static NumberFormat threeDecimalDigits() {
    return NumberFormatUtils.THREE_DECIMAL_DIGITS;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy