Class Unit


  • public class Unit
    extends Object
    Helper class to format number. We don't use existing format method in other library to minimise dependency. NuitonTrace can't work correctly if he has external dependncy.
    Version:
    $Revision$ Last update: $Date$ by : $Author$
    Author:
    poussin
    • Constructor Detail

      • Unit

        public Unit()
    • Method Detail

      • format

        public static String format​(double value,
                                    Unit.Memory source,
                                    int precision)
        Choice better target unit for this value. source unit must be small unit like octet or millis or nanosecond.
        Parameters:
        value -
        source -
        precision -
        Returns:
      • format

        public static String format​(double value,
                                    Unit.Time source,
                                    int precision)
        Choice better target unit for this value. source unit must be small unit like octet or millis or nanosecond.
        Parameters:
        value -
        source -
        precision -
        Returns: