Class NSMeasurementFormatter

    • Constructor Detail

      • NSMeasurementFormatter

        protected NSMeasurementFormatter​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • supportsSecureCoding

        public static boolean supportsSecureCoding()
      • version_static

        public static long version_static()
      • locale

        public NSLocale locale()
        If not specified, locale is set to the user's current locale.
      • numberFormatter

        public NSNumberFormatter numberFormatter()
        If not specified, the number formatter is set up with NSNumberFormatterDecimalStyle.
      • setLocale

        public void setLocale​(NSLocale value)
        If not specified, locale is set to the user's current locale.
      • setNumberFormatter

        public void setNumberFormatter​(NSNumberFormatter value)
        If not specified, the number formatter is set up with NSNumberFormatterDecimalStyle.
      • setUnitOptions

        public void setUnitOptions​(long value)
        This property can be set to ensure that the formatter behaves in a way the developer expects, even if it is not standard according to the preferences of the user's locale. If not specified, unitOptions defaults to localizing according to the preferences of the locale. Ex: By default, if unitOptions is set to the empty set, the formatter will do the following: - kilocalories may be formatted as "C" instead of "kcal" depending on the locale. - kilometersPerHour may be formatted as "miles per hour" for US and UK locales but "kilometers per hour" for other locales. However, if NSMeasurementFormatterUnitOptionsProvidedUnit is set, the formatter will do the following: - kilocalories would be formatted as "kcal" in the language of the locale, even if the locale prefers "C". - kilometersPerHour would be formatted as "kilometers per hour" for US and UK locales even though the preference is for "miles per hour." Note that NSMeasurementFormatter will handle converting measurement objects to the preferred units in a particular locale. For instance, if provided a measurement object in kilometers and the set locale is en_US, the formatter will implicitly convert the measurement object to miles and return the formatted string as the equivalent measurement in miles.
      • setUnitStyle

        public void setUnitStyle​(long value)
        If not specified, unitStyle is set to NSFormattingUnitStyleMedium.
      • stringFromMeasurement

        public java.lang.String stringFromMeasurement​(NSMeasurement<?> measurement)
      • stringFromUnit

        public java.lang.String stringFromUnit​(NSUnit unit)
        Parameters:
        An - NSUnit
        Returns:
        A formatted string representing the localized form of the unit without a value attached to it. This method will return [unit symbol] if the provided unit cannot be localized.
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
      • unitOptions

        public long unitOptions()
        This property can be set to ensure that the formatter behaves in a way the developer expects, even if it is not standard according to the preferences of the user's locale. If not specified, unitOptions defaults to localizing according to the preferences of the locale. Ex: By default, if unitOptions is set to the empty set, the formatter will do the following: - kilocalories may be formatted as "C" instead of "kcal" depending on the locale. - kilometersPerHour may be formatted as "miles per hour" for US and UK locales but "kilometers per hour" for other locales. However, if NSMeasurementFormatterUnitOptionsProvidedUnit is set, the formatter will do the following: - kilocalories would be formatted as "kcal" in the language of the locale, even if the locale prefers "C". - kilometersPerHour would be formatted as "kilometers per hour" for US and UK locales even though the preference is for "miles per hour." Note that NSMeasurementFormatter will handle converting measurement objects to the preferred units in a particular locale. For instance, if provided a measurement object in kilometers and the set locale is en_US, the formatter will implicitly convert the measurement object to miles and return the formatted string as the equivalent measurement in miles.
      • unitStyle

        public long unitStyle()
        If not specified, unitStyle is set to NSFormattingUnitStyleMedium.