Package com.ibm.icu.impl
Class UCharacterName.AlgorithmName
java.lang.Object
com.ibm.icu.impl.UCharacterName.AlgorithmName
- Enclosing class:
UCharacterName
Algorithmic name class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate char[]
private byte[]
private String
private int
private int
Algorithmic data informationprivate byte
private int[]
Utility int bufferprivate StringBuffer
Utility StringBufferprivate byte
(package private) static final int
Constant type value of the different AlgorithmName(package private) static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(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 nameprivate 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
Sets the name prefix
-
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_
-
m_factorstring_
private byte[] m_factorstring_ -
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 grouprangeend
- end code point that lies within this name grouptype
- 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 stringsvariant
- 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
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
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 pointstr
- StringBuffer to append to
-
getChar
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 intomaxlength
- 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
Gets the indexth string in each of the argument factor block- Parameters:
index
- array with each index corresponding to each factor blocklength
- length of the array index- Returns:
- the combined string of the array of indexth factor string in factor block
-
compareFactorString
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 blocklength
- index array lengthstr
- string to compare withoffset
- of str to start comparison- Returns:
- true if string matches
-