Package com.ibm.icu.impl
Class UCharacterName.AlgorithmName
- java.lang.Object
-
- com.ibm.icu.impl.UCharacterName.AlgorithmName
-
- Enclosing class:
- UCharacterName
static final class UCharacterName.AlgorithmName extends java.lang.Object
Algorithmic name class
-
-
Field Summary
Fields Modifier and Type Field Description private char[]
m_factor_
private byte[]
m_factorstring_
private java.lang.String
m_prefix_
private int
m_rangeend_
private int
m_rangestart_
Algorithmic data informationprivate byte
m_type_
private int[]
m_utilIntBuffer_
Utility int bufferprivate java.lang.StringBuffer
m_utilStringBuffer_
Utility StringBufferprivate byte
m_variant_
(package private) static int
TYPE_0_
Constant type value of the different AlgorithmName(package private) static int
TYPE_1_
-
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 nameprivate 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
-
-
-
Field Detail
-
TYPE_0_
static final int TYPE_0_
Constant type value of the different AlgorithmName- See Also:
- Constant Field Values
-
TYPE_1_
static final int TYPE_1_
- 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
-
-
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 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
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 pointstr
- 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 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
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 blocklength
- 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 blocklength
- index array lengthstr
- string to compare withoffset
- of str to start comparison- Returns:
- true if string matches
-
-