diff options
| author | Bdale Garbee <bdale@gag.com> | 2015-07-16 13:31:42 -0600 | 
|---|---|---|
| committer | Bdale Garbee <bdale@gag.com> | 2015-07-16 13:31:42 -0600 | 
| commit | 6e9bb9178356620bd47d9f2e31abf42b7f1a8f11 (patch) | |
| tree | 6f04b5500462d1f6e26ebcba58c5e9cd56afd442 /altoslib/AltosUnits.java | |
| parent | e2cefd8593d269ce603aaf33f4a53a5c2dcb3350 (diff) | |
| parent | 87c8bb3956897830da1f7aaca2990a9571767b73 (diff) | |
Merge branch 'master' into branch-1.6
Diffstat (limited to 'altoslib/AltosUnits.java')
| -rw-r--r-- | altoslib/AltosUnits.java | 23 | 
1 files changed, 17 insertions, 6 deletions
diff --git a/altoslib/AltosUnits.java b/altoslib/AltosUnits.java index f6e34e77..6b4fff0c 100644 --- a/altoslib/AltosUnits.java +++ b/altoslib/AltosUnits.java @@ -15,7 +15,9 @@   * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.   */ -package org.altusmetrum.altoslib_6; +package org.altusmetrum.altoslib_8; + +import java.text.*;  public abstract class AltosUnits { @@ -29,13 +31,22 @@ public abstract class AltosUnits {  	public abstract int show_fraction(int width, boolean imperial_units); -	public double parse(String s, boolean imperial_units) throws NumberFormatException { -		double v = Double.parseDouble(s); +	public double parse_locale(String s, boolean imperial_units) throws ParseException { +		double v = AltosParse.parse_double_locale(s); +		return inverse(v, imperial_units); +	} + +	public double parse_net(String s, boolean imperial_units) throws ParseException { +		double v = AltosParse.parse_double_net(s);  		return inverse(v, imperial_units);  	} -	public double parse(String s) throws NumberFormatException { -		return parse(s, AltosConvert.imperial_units); +	public double parse_locale(String s) throws ParseException { +		return parse_locale(s, AltosConvert.imperial_units); +	} + +	public double parse_net(String s) throws ParseException { +		return parse_net(s, AltosConvert.imperial_units);  	}  	public double value(double v) { @@ -105,4 +116,4 @@ public abstract class AltosUnits {  	public String say_units(double v) {  		return say_units(v, AltosConvert.imperial_units);  	} -}
\ No newline at end of file +}  | 
