@@ -0,0 +1,1351 @@
+package com.amalgam.lang;%0A%0Aimport android.util.Log;%0A%0A/**%0A * @author KeishinYokomaku%0A */%0A@SuppressWarnings(%22unused%22) // public APIs%0Apublic final class NumberUtils %7B%0A%09public static final String TAG = NumberUtils.class.getSimpleName();%0A%0A%09private NumberUtils() %7B%0A%09%09throw new AssertionError();%0A%09%7D%0A%0A%09public static Long tryParseLong(String number) %7B%0A%09%09try %7B%0A%09%09%09return Long.parseLong(number);%0A%09%09%7D catch (NumberFormatException e) %7B%0A%09%09%09Log.i(TAG, %22cannot convert the string to the number%22);%0A%09%09%09return null;%0A%09%09%7D%0A%09%7D%0A%0A%09public static Integer tryParseInt(String number) %7B%0A%09%09try %7B%0A%09%09%09return Integer.parseInt(number);%0A%09%09%7D catch (NumberFormatException e) %7B%0A%09%09%09Log.i(TAG, %22cannot convert the string to the number%22);%0A%09%09%09return null;%0A%09%09%7D%0A%09%7D%0A%0A%09public static Float tryParseFloat(String number) %7B%0A%09%09try %7B%0A%09%09%09return Float.parseFloat(number);%0A%09%09%7D catch (NumberFormatException e) %7B%0A%09%09%09Log.i(TAG, %22cannot convert the string to the number%22);%0A%09%09%09return null;%0A%09%09%7D%0A%09%7D%0A%0A%09public static Double tryParseDouble(String number) %7B%0A%09%09try %7B%0A%09%09%09return Double.parseDouble(number);%0A%09%09%7D catch (NumberFormatException e) %7B%0A%09%09%09Log.i(TAG, %22cannot convert the string to the number%22);%0A%09%09%09return null;%0A%09%09%7D%0A%09%7D%0A%0A%09public static boolean isNumber(String number) %7B%0A%09%09return tryParseInt(number) != null %7C%7C tryParseLong(number) != null %7C%7C%0A%09%09%09%09tryParseFloat(number) != null %7C%7C tryParseDouble(number) != null;%0A%09%7D%0A%7D

Introduce NumberUtils to parse the number