Class UCharacterName.AlgorithmName

  • Enclosing class:
    UCharacterName

    static final class UCharacterName.AlgorithmName
    extends java.lang.Object
    Algorithmic name class
    • Constructor Summary

      Constructors 
      Constructor Description
      AlgorithmName()
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) int add​(int[] set, int maxlength)
      Adds all chars in the set of algorithmic names into the set.
      (package private) void appendName​(int ch, java.lang.StringBuffer str)
      Appends algorithm name of code point into StringBuffer.
      private boolean compareFactorString​(int[] index, int length, java.lang.String str, int offset)
      Compares the indexth string in each of the argument factor block with the argument string
      (package private) boolean contains​(int ch)
      Checks if code point lies in Algorithm object at index
      (package private) int getChar​(java.lang.String name)
      Gets the character for the argument algorithmic name
      private java.lang.String getFactorString​(int[] index, int length)
      Gets the indexth string in each of the argument factor block
      (package private) boolean setFactor​(char[] factor)
      Sets the factor data
      (package private) boolean setFactorString​(byte[] string)
      Sets the variant factorized name data
      (package private) boolean setInfo​(int rangestart, int rangeend, byte type, byte variant)
      Sets the information for accessing the algorithmic names
      (package private) boolean setPrefix​(java.lang.String prefix)
      Sets the name prefix
      • Methods inherited from class java.lang.Object

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

      • TYPE_0_

        static final int TYPE_0_
        Constant type value of the different AlgorithmName
        See Also:
        Constant Field Values
      • m_rangestart_

        private int m_rangestart_
        Algorithmic data information
      • m_rangeend_

        private int m_rangeend_
      • m_type_

        private byte m_type_
      • m_variant_

        private byte m_variant_
      • m_factor_

        private char[] m_factor_
      • m_prefix_

        private java.lang.String m_prefix_
      • m_factorstring_

        private byte[] m_factorstring_
      • m_utilStringBuffer_

        private java.lang.StringBuffer m_utilStringBuffer_
        Utility StringBuffer
      • m_utilIntBuffer_

        private int[] m_utilIntBuffer_
        Utility int buffer
    • Constructor Detail

      • AlgorithmName

        AlgorithmName()
        Constructor
    • Method Detail

      • setInfo

        boolean setInfo​(int rangestart,
                        int rangeend,
                        byte type,
                        byte variant)
        Sets the information for accessing the algorithmic names
        Parameters:
        rangestart - starting code point that lies within this name group
        rangeend - end code point that lies within this name group
        type - algorithm type. There's 2 kinds of algorithmic type. First which uses code point as part of its name and the other uses variant postfix strings
        variant - algorithmic variant
        Returns:
        true if values are valid
      • setFactor

        boolean setFactor​(char[] factor)
        Sets the factor data
        Parameters:
        factor - Array of factor
        Returns:
        true if factors are valid
      • setPrefix

        boolean setPrefix​(java.lang.String prefix)
        Sets the name prefix
        Parameters:
        prefix -
        Returns:
        true if prefix is set
      • setFactorString

        boolean setFactorString​(byte[] string)
        Sets the variant factorized name data
        Parameters:
        string - variant factorized name data
        Returns:
        true if values are set
      • contains

        boolean contains​(int ch)
        Checks if code point lies in Algorithm object at index
        Parameters:
        ch - code point
      • appendName

        void appendName​(int ch,
                        java.lang.StringBuffer str)
        Appends algorithm name of code point into StringBuffer. Note this method does not check for validity of code point in Algorithm, result is undefined if code point does not belong in Algorithm.
        Parameters:
        ch - code point
        str - StringBuffer to append to
      • getChar

        int getChar​(java.lang.String name)
        Gets the character for the argument algorithmic name
        Returns:
        the algorithmic char or -1 otherwise.
      • add

        int add​(int[] set,
                int maxlength)
        Adds all chars in the set of algorithmic names into the set. Equivalent to part of calcAlgNameSetsLengths.
        Parameters:
        set - int set to add the chars of the algorithm names into
        maxlength - maximum length to compare to
        Returns:
        the length that is either maxlength of the length of this algorithm name if it is longer than maxlength
      • getFactorString

        private java.lang.String getFactorString​(int[] index,
                                                 int length)
        Gets the indexth string in each of the argument factor block
        Parameters:
        index - array with each index corresponding to each factor block
        length - length of the array index
        Returns:
        the combined string of the array of indexth factor string in factor block
      • compareFactorString

        private boolean compareFactorString​(int[] index,
                                            int length,
                                            java.lang.String str,
                                            int offset)
        Compares the indexth string in each of the argument factor block with the argument string
        Parameters:
        index - array with each index corresponding to each factor block
        length - index array length
        str - string to compare with
        offset - of str to start comparison
        Returns:
        true if string matches