Class NSOrthography

  • All Implemented Interfaces:
    NSCoding, NSCopying, NSSecureCoding, NSObject

    public class NSOrthography
    extends NSObject
    implements NSCopying, NSSecureCoding
    NSOrthography is a class used to describe the linguistic content of a piece of text, especially for the purposes of spelling and grammar checking. It describes (a) which scripts the text contains, (b) a dominant language and possibly other languages for each of these scripts, and (c) a dominant script and language for the text as a whole. Scripts are uniformly described by standard four-letter tags (Latn, Grek, Cyrl, etc.) with the supertags Jpan and Kore typically used for Japanese and Korean text, Hans and Hant for Chinese text; the tag Zyyy is used if a specific script cannot be identified. Languages are uniformly described by BCP-47 tags, preferably in canonical form; the tag und is used if a specific language cannot be determined. API-Since: 4.0
    • Constructor Detail

      • NSOrthography

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

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

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

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

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

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

        @NotNull
        public static @NotNull 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

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • orthographyWithDominantScriptLanguageMap

        public static NSOrthography orthographyWithDominantScriptLanguageMap​(@NotNull
                                                                             @NotNull java.lang.String script,
                                                                             @NotNull
                                                                             @NotNull NSDictionary<java.lang.String,​? extends NSArray<java.lang.String>> map)
        API-Since: 4.0
      • 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()
      • allLanguages

        @NotNull
        public @NotNull NSArray<java.lang.String> allLanguages()
        API-Since: 4.0
      • allScripts

        @NotNull
        public @NotNull NSArray<java.lang.String> allScripts()
        API-Since: 4.0
      • copyWithZone

        @NotNull
        public @NotNull java.lang.Object copyWithZone​(@Nullable
                                                      @Nullable org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • dominantLanguage

        @NotNull
        public @NotNull java.lang.String dominantLanguage()
        The dominantLanguage is the first in the list of languages for the dominant script, allScripts includes the dominant script and all others appearing as keys in the language map, and allLanguages includes all languages appearing in the values of the language map. API-Since: 4.0
      • dominantLanguageForScript

        @Nullable
        public @Nullable java.lang.String dominantLanguageForScript​(@NotNull
                                                                    @NotNull java.lang.String script)
        API-Since: 4.0
      • dominantScript

        @NotNull
        public @NotNull java.lang.String dominantScript()
        These are the primitive properties which a subclass must implement. The dominantScript should be a script tag (such as Latn, Cyrl, and so forth) and the languageMap should be a dictionary whose keys are script tags and whose values are arrays of language tags (such as en, fr, de, and so forth).
      • initWithDominantScriptLanguageMap

        public NSOrthography initWithDominantScriptLanguageMap​(@NotNull
                                                               @NotNull java.lang.String script,
                                                               @NotNull
                                                               @NotNull NSDictionary<java.lang.String,​? extends NSArray<java.lang.String>> map)
        API-Since: 4.0
      • languageMap

        @NotNull
        public @NotNull NSDictionary<java.lang.String,​? extends NSArray<java.lang.String>> languageMap()
      • languagesForScript

        @Nullable
        public @Nullable NSArray<java.lang.String> languagesForScript​(@NotNull
                                                                      @NotNull java.lang.String script)
        languagesForScript: returns the list of languages for the specified script, and dominantLanguageForScript: returns the first item on that list. API-Since: 4.0
      • _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
      • defaultOrthographyForLanguage

        @NotNull
        public static @NotNull NSOrthography defaultOrthographyForLanguage​(@NotNull
                                                                           @NotNull java.lang.String language)
        API-Since: 11.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.