Class NumberUtil

java.lang.Object
com.earth2me.essentials.utils.NumberUtil

public final class NumberUtil extends Object
  • Method Details

    • internalSetPrettyFormat

      public static void internalSetPrettyFormat(NumberFormat prettyFormat)
    • shortCurrency

      public static String shortCurrency(BigDecimal value, IEssentials ess)
    • formatDouble

      public static String formatDouble(double value)
    • formatAsCurrency

      public static String formatAsCurrency(BigDecimal value)
    • formatAsPrettyCurrency

      public static String formatAsPrettyCurrency(BigDecimal value)
    • displayCurrency

      public static String displayCurrency(BigDecimal value, IEssentials ess)
    • displayCurrencyExactly

      public static String displayCurrencyExactly(BigDecimal value, IEssentials ess)
    • sanitizeCurrencyString

      public static String sanitizeCurrencyString(String input, IEssentials ess)
    • isInt

      public static boolean isInt(String sInt)
    • isLong

      public static boolean isLong(String sLong)
    • isPositiveInt

      public static boolean isPositiveInt(String sInt)
    • constrainToRange

      public static int constrainToRange(int value, int min, int max)
      Backport from Guava.