Class MassUnit


  • public class MassUnit
    extends Unit
    MassUnit is a class that contains all the mass units that are supported by the app
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.HashMap<java.lang.String,​java.lang.Double> CONVERSION_FACTORS
      The conversion factors for the mass units
      static java.lang.String smallestMetricUnit
      The smallest unit for metric mass
      static java.util.HashMap<java.lang.String,​java.util.Set<java.lang.String>> UNIT_SYSTEMS
      The unit systems that the mass units are in
    • Constructor Summary

      Constructors 
      Constructor Description
      MassUnit​(java.lang.String unit)
      Constructor for the MassUnit class
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • smallestMetricUnit

        public static final java.lang.String smallestMetricUnit
        The smallest unit for metric mass
        See Also:
        Constant Field Values
      • CONVERSION_FACTORS

        public static final java.util.HashMap<java.lang.String,​java.lang.Double> CONVERSION_FACTORS
        The conversion factors for the mass units
      • UNIT_SYSTEMS

        public static final java.util.HashMap<java.lang.String,​java.util.Set<java.lang.String>> UNIT_SYSTEMS
        The unit systems that the mass units are in
    • Constructor Detail

      • MassUnit

        public MassUnit​(java.lang.String unit)
        Constructor for the MassUnit class
        Parameters:
        unit - the unit of mass