Added UnitGroup.fromUnit which delegates to UnitGroup.getDefaultUnit().fromUnit.

This commit is contained in:
Kevin Ruland 2012-06-04 19:17:05 +00:00
parent 0250f29f26
commit 56f157a7a5

View File

@ -458,6 +458,17 @@ public class UnitGroup {
return units.toArray(new Unit[0]);
}
/**
* Return the value in SI units from the default unit of this group.
* It is the same as calling <code>getDefaultUnit().fromUnit(value)</code>
*
* @param value the default unit value to convert
* @return the value in SI units.
* @see Unit#fromUnit(double)
*/
public double fromUnit( double value ) {
return this.getDefaultUnit().fromUnit(value);
}
/**
* Return the value formatted by the default unit of this group.