Subversion Repositories eFlore/Applications.coel

Rev

Rev 1415 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1415 Rev 1896
Line 5... Line 5...
5
public class UtilNombre {
5
public class UtilNombre {
Line 6... Line 6...
6
	
6
	
7
	public static String formaterEnEntier(double nombre) {
7
	public static String formaterEnEntier(double nombre) {
8
		NumberFormat formatNbreEntier = NumberFormat.getFormat("#");
8
		NumberFormat formatNbreEntier = NumberFormat.getFormat("#");
9
		return formatNbreEntier.format(nombre);
9
		return formatNbreEntier.format(nombre);
-
 
10
	}
-
 
11
	
-
 
12
	public static boolean estUnNombre(String str) {  
-
 
13
		try  
-
 
14
		{  
-
 
15
		  double d = Double.parseDouble(str);  
-
 
16
		}  
-
 
17
		catch(NumberFormatException nfe)  
-
 
18
		{  
-
 
19
			return false;  
-
 
20
		}  
-
 
21
		return true;  
10
	}	
22
	}