class PaymentUtils {

    public static boolean matchesQuantityPatternOrEmpty(@Nullable String quantityString) {
        if (TextUtils.isEmpty(quantityString)) {
            return true;
        }
        Pattern pattern = Pattern.compile("[0-9]+(\\.[0-9])?");
        return pattern.matcher(quantityString).matches();

    }

}