/** * Unit string representation. */ public String toString() { return uu.toString(); }
/** * Unit string representation. */ public String toString() { return uu.toString(); }
/** * Unit string representation. */ public String toString() { return uu.toString(); }
/** * Returns the canonical string representation of the unit. * * @return The canonical string representation. */ public String getCanonicalString() { /* change this, not thread-safe; require dependency of joda-time (!) dateFormat = (SimpleDateFormat) DateFormat.getDateInstance(DateFormat.SHORT, Locale.US); dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); dateFormat.applyPattern(" 'since' yyyy-MM-dd HH:mm:ss.SSS 'UTC'"); */ return getUnit().toString() + " since " + df_units.print(getOrigin().getTime()); }
/** * Returns the canonical string representation of the unit. * * @return The canonical string representation. */ public String getCanonicalString() { /* change this, not thread-safe; require dependency of joda-time (!) dateFormat = (SimpleDateFormat) DateFormat.getDateInstance(DateFormat.SHORT, Locale.US); dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); dateFormat.applyPattern(" 'since' yyyy-MM-dd HH:mm:ss.SSS 'UTC'"); */ return getUnit().toString() + " since " + df_units.print(getOrigin().getTime()); }
/** * Returns the canonical string representation of the unit. * * @return The canonical string representation. */ public String getCanonicalString() { return DerivedUnitImpl.DIMENSIONLESS.equals(_unit) ? Double.toString(getScale()) : Double.toString(getScale()) + " " + _unit.toString(); }
/** * Returns the canonical string representation of the unit. * * @return The canonical string representation. */ public String getCanonicalString() { return DerivedUnitImpl.DIMENSIONLESS.equals(_unit) ? Double.toString(getScale()) : Double.toString(getScale()) + " " + _unit.toString(); }
/** * Returns the canonical string representation of the unit. * * @return The canonical string representation. */ public String getCanonicalString() { return "(" + getUnit().toString() + ") @ " + getOffset(); } }
/** * Returns the canonical string representation of the unit. * * @return The canonical string representation. */ public String getCanonicalString() { return "(" + getUnit().toString() + ") @ " + getOffset(); } }
+ '"'); System.out.println("format.parse(\"min\").toString() = \"" + format.parse("min").toString() + '"'); System.out.println("format.parse(\"60 s\") = \"" + format.parse("60 s") + '"'); + '"'); System.out.println("format.parse(\"Cel\").toString() = \"" + format.parse("Cel").toString() + '"'); System.out .println("format.parse(\"min @ 1970-01-01 00:00:00 UTC\") = \"" System.out .println("format.parse(\"min @ 2000-01-01 00 UTC\").toString() = \"" + format.parse("min @ 2000-01-01 00 UTC").toString() + '"'); System.out.println("format.parse(\"g/kg\") = \"" + format.parse("g/kg") UnitName.newUnitName("mixing ratio")); System.out.println("mixingRatio.toString() = \"" + mixingRatio.toString() + '"'); System.out.println("format.longFormat(mixingRatio) = \"" + format.longFormat(mixingRatio) + '"'); System.out .println("format.parse(\"(g/mol)/(lb/kmol)\").toString() = \"" + format.parse("(g/mol)/(lb/kmol)").toString() + '"'); System.out .println("format.longFormat(format.parse(\"(g/mol)/(lb/kmol)\")) = \""