Class IdentifierInfo


  • @Deprecated
    public class IdentifierInfo
    extends Object
    Deprecated.
    This API is ICU internal only.
    This class analyzes a possible identifier for script and identifier status. Use it by calling setIdentifierProfile then setIdentifier. Available methods include:
    1. call getScripts for the specific scripts in the identifier. The identifier contains at least one character in each of these.
    2. call getAlternates to get cases where a character is not limited to a single script. For example, it could be either Katakana or Hiragana.
    3. call getCommonAmongAlternates to find out if any scripts are common to all the alternates.
    4. call getNumerics to get a representative character (with value zero) for each of the decimal number systems in the identifier.
    5. call getRestrictionLevel to see what the UTS36 restriction level is.
    • Field Detail

      • BITSET_COMPARATOR

        @Deprecated
        public static final Comparator<BitSet> BITSET_COMPARATOR
        Deprecated.
        This API is ICU internal only.
        Order BitSets, first by shortest, then by items.
    • Method Detail

      • setIdentifierProfile

        @Deprecated
        public IdentifierInfo setIdentifierProfile​(UnicodeSet identifierProfile)
        Deprecated.
        This API is ICU internal only.
        Set the identifier profile: the characters that are to be allowed in the identifier.
        Parameters:
        identifierProfile - the characters that are to be allowed in the identifier
        Returns:
        self
      • getIdentifierProfile

        @Deprecated
        public UnicodeSet getIdentifierProfile()
        Deprecated.
        This API is ICU internal only.
        Get the identifier profile: the characters that are to be allowed in the identifier.
        Returns:
        The characters that are to be allowed in the identifier.
      • setIdentifier

        @Deprecated
        public IdentifierInfo setIdentifier​(String identifier)
        Deprecated.
        This API is ICU internal only.
        Set an identifier to analyze. Afterwards, call methods like getScripts()
        Parameters:
        identifier - the identifier to analyze
        Returns:
        self
      • getIdentifier

        @Deprecated
        public String getIdentifier()
        Deprecated.
        This API is ICU internal only.
        Get the identifier that was analyzed.
        Returns:
        the identifier that was analyzed.
      • getScripts

        @Deprecated
        public BitSet getScripts()
        Deprecated.
        This API is ICU internal only.
        Get the scripts found in the identifiers.
        Returns:
        the set of explicit scripts.
      • getAlternates

        @Deprecated
        public Set<BitSet> getAlternates()
        Deprecated.
        This API is ICU internal only.
        Get the set of alternate scripts found in the identifiers. That is, when a character can be in two scripts, then the set consisting of those scripts will be returned.
        Returns:
        the set of explicit scripts.
      • getNumerics

        @Deprecated
        public UnicodeSet getNumerics()
        Deprecated.
        This API is ICU internal only.
        Get the representative characters (zeros) for the numerics found in the identifier.
        Returns:
        the set of explicit scripts.
      • getCommonAmongAlternates

        @Deprecated
        public BitSet getCommonAmongAlternates()
        Deprecated.
        This API is ICU internal only.
        Find out which scripts are in common among the alternates.
        Returns:
        the set of scripts that are in common among the alternates.
      • getRestrictionLevel

        @Deprecated
        public SpoofChecker.RestrictionLevel getRestrictionLevel()
        Deprecated.
        This API is ICU internal only.
        Find the "tightest" restriction level that the identifier satisfies.
        Returns:
        the restriction level.
      • getScriptCount

        @Deprecated
        public int getScriptCount()
        Deprecated.
        This API is ICU internal only.
        Get the number of scripts appearing in the identifier. Note: Common and Inherited scripts are omitted from the count. Note: If the identifier contains characters with alternate scripts (the character is used with more than one script), minimize the reported number of scripts by considering the character to be of a script that already appears elsewhere in the identifier when possible. The alternate script computation may not be perfect. The distinction between 0, 1 and > 1 scripts will be valid, however.
        Returns:
        the number of scripts.
      • toString

        @Deprecated
        public String toString()
        Deprecated.
        This API is ICU internal only.
        See Object.toString()
        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.
      • displayAlternates

        @Deprecated
        public static String displayAlternates​(Set<BitSet> alternates)
        Deprecated.
        This API is ICU internal only.
        Produce a readable string of alternates.
        Parameters:
        alternates - a set of BitSets of script values.
        Returns:
        display form
      • displayScripts

        @Deprecated
        public static String displayScripts​(BitSet scripts)
        Deprecated.
        This API is ICU internal only.
        Produce a readable string of a set of scripts
        Parameters:
        scripts - a BitSet of UScript values
        Returns:
        a readable string of a set of scripts
      • parseScripts

        @Deprecated
        public static BitSet parseScripts​(String scriptsString)
        Deprecated.
        This API is ICU internal only.
        Parse a text list of scripts into a BitSet.
        Parameters:
        scriptsString - the string to be parsed
        Returns:
        BitSet of UScript values.
      • parseAlternates

        @Deprecated
        public static Set<BitSet> parseAlternates​(String scriptsSetString)
        Deprecated.
        This API is ICU internal only.
        Parse a list of alternates into a set of sets of UScript values.
        Parameters:
        scriptsSetString - a list of alternates, separated by ;
        Returns:
        a set of BitSets of UScript values
      • contains

        @Deprecated
        public static final boolean contains​(BitSet container,
                                             BitSet containee)
        Deprecated.
        This API is ICU internal only.
        Test containment. Should be a method on BitSet.
        Parameters:
        container - possible container to be tested
        containee - possible containee to be tested
        Returns:
        true if container contains containee
      • set

        @Deprecated
        public static final BitSet set​(BitSet bitset,
                                       int... values)
        Deprecated.
        This API is ICU internal only.
        Sets a number of values at once. Should be on BitSet.
        Parameters:
        bitset - bitset to be affected
        values - values to be set in the bitset
        Returns:
        modified bitset.