Class NoneUnit

  • All Implemented Interfaces:
    Unit

    public class NoneUnit
    extends SimpleUnit
    Simple unit that comprises a single unit
    Author:
    markr
    • Constructor Detail

      • NoneUnit

        protected NoneUnit()
        Constructor
    • Method Detail

      • isCombinedUnit

        public boolean isCombinedUnit()
        Is the unit a single or combined unit
        Specified by:
        isCombinedUnit in interface Unit
        Overrides:
        isCombinedUnit in class SimpleUnit
        Returns:
        false when single, true when combined
      • convertTo

        public double convertTo​(Unit to,
                                double value)
        Convert one unit to the other for a given value
        Parameters:
        to - to unit
        value - value to convert
        Returns:
        converted value