Android String to Number Convert isStringNumber(String number)

Here you can find the source of isStringNumber(String number)

Description

is String Number

Declaration

public static boolean isStringNumber(String number) 

Method Source Code

//package com.java2s;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
    public static boolean isStringNumber(String number) {

        if ((number == null)) {
            return false;
        } else {/*from   w w w  .j av a2 s . com*/
            String validator = "\\d+";

            Pattern pattern = Pattern.compile(validator);

            Matcher m = pattern.matcher(number);

            return m.matches();
        }
    }
}

Related

  1. isNumericOnly(String pString)
  2. isNumeric(String str)
  3. containsNonNumericCharacters(String rawInput)
  4. isNumber(String str)
  5. isNumberLetter(String str)
  6. isStringNumberLessThan(String number, int compareInt)