Class VolumeUnit


  • public class VolumeUnit
    extends Unit
    VolumeUnit is an enum that contains all the volume 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  
      static java.lang.String smallestMetricUnit
      The smallest unit for metric volume
      static java.util.HashMap<java.lang.String,​java.util.Set<java.lang.String>> UNIT_SYSTEMS  
    • Constructor Summary

      Constructors 
      Constructor Description
      VolumeUnit​(java.lang.String unit)
      Constructor for the VolumeUnit 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 volume
        See Also:
        Constant Field Values
      • CONVERSION_FACTORS

        public static final java.util.HashMap<java.lang.String,​java.lang.Double> CONVERSION_FACTORS
      • UNIT_SYSTEMS

        public static final java.util.HashMap<java.lang.String,​java.util.Set<java.lang.String>> UNIT_SYSTEMS
    • Constructor Detail

      • VolumeUnit

        public VolumeUnit​(java.lang.String unit)
                   throws java.lang.IllegalArgumentException
        Constructor for the VolumeUnit class
        Parameters:
        unit - the unit to convert
        Throws:
        java.lang.IllegalArgumentException - if the unit is not supported by the app