Revision 3566 trunk/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/utils/Doubles.java
Doubles.java | ||
---|---|---|
1 |
|
|
1 | 2 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
2 | 3 |
* |
3 | 4 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
... | ... | |
42 | 43 |
|
43 | 44 |
/** |
44 | 45 |
* This class has functions to work with Double's |
46 |
* |
|
47 |
* |
|
45 | 48 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
46 | 49 |
*/ |
47 | 50 |
public class Doubles { |
48 | 51 |
|
49 |
/** |
|
50 |
* This function returns a String that represents a double with just 5 decimal |
|
51 |
* numbers. |
|
52 |
* @param number |
|
53 |
* Double (like a String) |
|
54 |
* @return |
|
55 |
*/ |
|
56 |
public static String get5Decimals(String number){ |
|
52 |
/** |
|
53 |
* This function returns a String that represents a double with just 5 decimal |
|
54 |
* numbers. |
|
55 |
* |
|
56 |
* |
|
57 |
* @return |
|
58 |
* @param number Double (like a String) |
|
59 |
*/ |
|
60 |
public static String get5Decimals(String number) { |
|
57 | 61 |
String parsedValue = null; |
58 | 62 |
if (number.indexOf(".") >= 0){ |
59 | 63 |
int pointPosition = number.indexOf("."); |
... | ... | |
69 | 73 |
} |
70 | 74 |
|
71 | 75 |
|
72 |
} |
|
73 |
} |
|
76 |
} |
|
77 |
} |
Also available in: Unified diff