Class NSMeasurementFormatterUnitOptions


  • public final class NSMeasurementFormatterUnitOptions
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long NaturalScale
      e.g.
      static long ProvidedUnit
      e.g This ensures the formatter uses this unit even if it is not the preferred unit of the set locale.
      static long TemperatureWithoutUnit
      e.g.
    • Method Summary

      • Methods inherited from class java.lang.Object

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

      • ProvidedUnit

        public static final long ProvidedUnit
        e.g This ensures the formatter uses this unit even if it is not the preferred unit of the set locale.
        See Also:
        Constant Field Values
      • NaturalScale

        public static final long NaturalScale
        e.g. This would make the formatter show "12 kilometers" instead of "12000 meters". Note that setting NSMeasurementFormatterUnitOptionsNaturalScale results in scaling within the unit system of the preferred unit of the locale. To scale within the unit system of the provided unit, set NSMeasurementFormatterUnitOptionsNaturalScale | NSMeasurementFormatterUnitOptionsProvidedUnit.
        See Also:
        Constant Field Values
      • TemperatureWithoutUnit

        public static final long TemperatureWithoutUnit
        e.g. This would display "90°" rather than "90°F" or "90°C"
        See Also:
        Constant Field Values