/* * Convert into the unit passed. * Units are defined in in this class an are intended to be passed in by the caller to this "to" method */ public double to(PublicUnits.Unit unit) { return(CUSTOM_LENGTH.To(unit.VAL)); }
/* * Constructor which also is needed to set the "from" value and unit */ public PublicUnits(PublicUnits.Unit unit, double input) { CUSTOM_LENGTH.From(unit.VAL, input); }