Class UCharacterName.AlgorithmName
java.lang.Object
com.ibm.icu.impl.UCharacterName.AlgorithmName
- Enclosing class:
UCharacterName
Algorithmic name class
- Since:
- nov0700
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate char[]private byte[]private Stringprivate intprivate intAlgorithmic data informationprivate byteprivate byte(package private) static final intConstant type value of the different AlgorithmName(package private) static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) intadd(int[] set, int maxlength) Adds all chars in the set of algorithmic names into the set.(package private) voidappendName(int ch, StringBuilder str) Appends algorithm name of code point into StringBuilder.private booleancompareFactorString(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) booleancontains(int ch) Checks if code point lies in Algorithm object at index(package private) intgetChar(CharacterNameQuery query) Gets the character for the argument algorithmic nameprivate StringgetFactorString(int[] index, int length) Gets the indexth string in each of the argument factor block(package private) booleansetFactor(char[] factor) Sets the factor data(package private) booleansetFactorString(byte[] string) Sets the variant factorized name data(package private) booleansetInfo(int rangestart, int rangeend, byte type, byte variant) Sets the information for accessing the algorithmic names(package private) booleanSets 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_
-
-
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 StringBuilder. 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- StringBuilder 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
-