Class UCharacterName.AlgorithmName

java.lang.Object
com.ibm.icu.impl.UCharacterName.AlgorithmName
Enclosing class:
UCharacterName

static final class UCharacterName.AlgorithmName extends Object
Algorithmic name class
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private char[]
     
    private byte[]
     
    private String
     
    private int
     
    private int
    Algorithmic data information
    private byte
     
    private int[]
    Utility int buffer
    private StringBuffer
    Utility StringBuffer
    private byte
     
    (package private) static final int
    Constant type value of the different AlgorithmName
    (package private) static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor
  • Method Summary

    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, StringBuffer str)
    Appends algorithm name of code point into StringBuffer.
    private boolean
    compareFactorString(int[] index, int length, 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
    Gets the character for the argument algorithmic name
    private 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(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 Details

    • TYPE_0_

      static final int TYPE_0_
      Constant type value of the different AlgorithmName
      See Also:
    • TYPE_1_

      static final int TYPE_1_
      See Also:
    • 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 String m_prefix_
    • m_factorstring_

      private byte[] m_factorstring_
    • m_utilStringBuffer_

      private StringBuffer m_utilStringBuffer_
      Utility StringBuffer
    • m_utilIntBuffer_

      private int[] m_utilIntBuffer_
      Utility int buffer
  • Constructor Details

    • AlgorithmName

      AlgorithmName()
      Constructor
  • Method Details

    • 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(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, 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(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 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, 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