Class NumericUtils

java.lang.Object
cn.longky.common.utils.NumericUtils

public class NumericUtils extends Object
Since:
1.0
Author:
yingzhan
  • Constructor Details

    • NumericUtils

      public NumericUtils()
  • Method Details

    • asLong

      public static Long asLong(Number n)
    • asInt

      public static Integer asInt(Number n)
    • asShort

      public static Short asShort(Number n)
    • toInt

      public static int toInt(String str)
    • toInt

      public static int toInt(String str, int defaultValue)
    • toLong

      public static long toLong(String str)
    • toLong

      public static long toLong(String str, long defaultValue)
    • toFloat

      public static float toFloat(String str)
    • toFloat

      public static float toFloat(String str, float defaultValue)
    • toDouble

      public static double toDouble(String str)
    • toDouble

      public static double toDouble(String str, double defaultValue)
    • toByte

      public static byte toByte(String str)
    • toByte

      public static byte toByte(String str, byte defaultValue)
    • toShort

      public static short toShort(String str)
    • toShort

      public static short toShort(String str, short defaultValue)
    • isNumeric

      public static boolean isNumeric(String s)