Android examples for java.lang:Double
is string containing Double number
import android.util.Log; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main{ public static boolean isDouble(String str) { Pattern pattern = Pattern.compile("^[-\\+]?[.\\d]*$"); return pattern.matcher(str).matches(); }/*from ww w. j a v a 2 s .co m*/ }