Subversion Repositories eFlore/Applications.coel

Rev

Rev 1415 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1415 Rev 1896
1
package org.tela_botanica.client.util;
1
package org.tela_botanica.client.util;
2
 
2
 
3
import com.google.gwt.i18n.client.NumberFormat;
3
import com.google.gwt.i18n.client.NumberFormat;
4
 
4
 
5
public class UtilNombre {
5
public class UtilNombre {
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
	}	
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;  
-
 
22
	}
11
}
23
}