Changeset 16985 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2020-08-30T22:19:00+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/SystemOfMeasurement.java
r15661 r16985 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.marktr; 5 import static org.openstreetmap.josm.tools.I18n.tr; 5 6 6 7 import java.text.NumberFormat; … … 127 128 /** 128 129 * Sets the current global system of measurement. 129 * @param som Key The system of measurement key. Must be defined in {@link SystemOfMeasurement#ALL_SYSTEMS}.130 * @param som The system of measurement to set. Must be defined in {@link SystemOfMeasurement#ALL_SYSTEMS}. 130 131 * @throws IllegalArgumentException if {@code somKey} is not known 131 * @since 8554 132 */ 133 public static void setSystemOfMeasurement(String somKey) { 132 * @since xxx (signature) 133 */ 134 public static void setSystemOfMeasurement(SystemOfMeasurement som) { 135 String somKey = som.getName(); 134 136 if (!SystemOfMeasurement.ALL_SYSTEMS.containsKey(somKey)) { 135 137 throw new IllegalArgumentException("Invalid system of measurement: "+somKey); … … 285 287 286 288 /** 289 * Returns the localized name of this system of measurement 290 * @return the localized name 291 */ 292 @Override 293 public String toString() { 294 return tr(name); 295 } 296 297 /** 287 298 * Returns the default system of measurement for the current country. 288 299 * @return the default system of measurement for the current country
Note:
See TracChangeset
for help on using the changeset viewer.