private boolean isValid(String str) {
		if (str.length() == 0)
			return false;
		
    	if (str.charAt(0) == '-' || str.charAt(0) == '+')
    		str = str.substring(1);
    	
    	String s2[] = str.split("\\.");
    	if (s2.length > 2 || s2.length == 0)
    		return false;
    	
    	for (String num : s2)
    		if (isValidNum(num) == false)
    			return false;
    	
    	return true;
	}