Top Description Inners Fields Constructors Methods
com.ibm.icu.impl

public final Class UCharacterName

extends Object
Class Inheritance
Imports
java.io.IOException, java.nio.ByteBuffer, java.util.Locale, .MissingResourceException, com.ibm.icu.lang.UCharacter, .UCharacterCategory, com.ibm.icu.text.UTF16, .UnicodeSet

Internal class to manage character names. Since data for names are stored in an array of char, by default indexes used in this class is referring to a 2 byte count, unless otherwise stated. Cases where the index is referring to a byte count, the index is halved and depending on whether the index is even or odd, the MSB or LSB of the result char at the halved index is returned. For indexes to an array of int, the index is multiplied by 2, result char at the multiplied index and its following char is returned as an int. UCharacter acts as a public facade for this class Note : 0 - 0x1F are control characters without names in Unicode 3.0
Author
Syn Wee Quek
Since
nov0700

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
UCharacterName.AlgorithmName

Algorithmic name class

Field Summary

Modifier and TypeField and Description
pack-priv static final int
EXTENDED_CATEGORY_

Extended category count

private static final String
FILE_NAME_

Default name of the name datafile

private static final int
GROUP_MASK_

Mask to retrieve the offset for a particular character within a group

private static final int
GROUP_SHIFT_

Shift count to retrieve group information

public static final UCharacterName
private static final int
LEAD_SURROGATE_

Lead surrogate type

public static final int
LINES_PER_GROUP_

Number of lines per group 1 << GROUP_SHIFT_

private UCharacterName.AlgorithmName[]
public int
m_groupcount_

Maximum number of groups

private char[]
private char[]
private char[]
m_groupoffsets_

Group use.

pack-priv int
m_groupsize_

Size of each groups

private byte[]
private int[]
m_ISOCommentSet_

Set of chars used in ISO comments.

private int
m_maxISOCommentLength_

Maximum ISO comment length

private int
m_maxNameLength_

Maximum name length

private int[]
m_nameSet_

Set of chars used in character names (regular & 1.0).

private byte[]
private char[]
m_tokentable_

Data used in unames.icu

private int[]
m_utilIntBuffer_

Utility int buffer

private StringBuffer
m_utilStringBuffer_

Utility StringBuffer

private static final int
NON_CHARACTER_

Not a character type

private static final int
OFFSET_HIGH_OFFSET_

Position of offsethigh in group information array

private static final int
OFFSET_LOW_OFFSET_

Position of offsetlow in group information array

private static final int
SINGLE_NIBBLE_MAX_

Double nibble indicator, any nibble > this number has to be combined with its following nibble

private static final int
TRAIL_SURROGATE_

Trail surrogate type

private static final String[]
TYPE_NAMES_

Type names used for extended names

private static final String
UNKNOWN_TYPE_NAME_

Unknown type name

Constructor Summary

AccessConstructor and Description
private
UCharacterName()

Protected constructor for use in UCharacter.

Method Summary

Modifier and TypeMethod and Description
private static void
add(int[]
set to add to
set
,
char
16 bit char to add
ch
)

Adds a codepoint into a set of ints.

private static int
add(int[]
set to add all chars of str to
set
,
String
string to add
str
)

Adds all characters of the argument str and gets the length Equivalent to calcStringSetLength.

private static int
add(int[]
set to add all chars of str to
set
,
StringBuffer
string to add
str
)

Adds all characters of the argument str and gets the length Equivalent to calcStringSetLength.

private int

Returns:

the maximum length of any possible algorithmic name if it is > maxlength, otherwise maxlength is returned.
addAlgorithmName
(int
length to compare to
maxlength
)

Adds all algorithmic names into the name set.

private int

Returns:

the maxlength of any possible extended name.
addExtendedName
(int
length to compare to
maxlength
)

Adds all extended names into the name set.

private int[]

Returns:

the length of the name string and the length of the group string parsed
addGroupName
(int
of the group name string in byte count
offset
,
int
of the group name string
length
,
byte[]
array to store the length of each token
tokenlength
,
int[]
to add to
set
)

Adds names of a group to the argument set.

private void
addGroupName(int
length to compare to
maxlength
)

Adds names of all group to the argument set.

private static boolean

Returns:

true if codepoint is part of the set, false otherwise
contains
(int[]
set to check in
set
,
char
16 bit char to check
ch
)

Checks if a codepoint is a part of a set of ints.

private void
convert(int[]
Set of 256 bit flags corresponding to a set of chars.
set
,
UnicodeSet
USet to receive characters. Existing contents are deleted.
uset
)

Converts the char set cset into a Unicode set uset.

private String

Returns:

the algorithmic name or null if not found
getAlgName
(int
character to determine name for
ch
,
int
name choice
choice
)

Gets the algorithmic name for the argument character

public int

Returns:

algorithm range end
getAlgorithmEnd
(int
algorithm index
index
)

Gets the end of the range

public int

Returns:

Algorithm range length
getAlgorithmLength
()

Get the Algorithm range length

public String

Returns:

algorithmic name of codepoint
getAlgorithmName
(int
algorithmic range index
index
,
int
The codepoint value.
codepoint
)

Gets the Algorithmic name of the codepoint

public int

Returns:

algorithm range start
getAlgorithmStart
(int
algorithm index
index
)

Gets the start of the range

public int

Returns:

code point
getCharFromName
(int
selector to indicate if argument name is a Unicode 1.0 or the most current version
choice
,
String
the name to search for
name
)

Find a character by its name and return its code point value

public void
getCharNameCharacters(UnicodeSet
USet to receive characters. Existing contents are deleted.
set
)

Fills set with characters that are used in Unicode character names.

public static int

Returns:

the MSB of the codepoint
getCodepointMSB
(int
The codepoint value.
codepoint
)

Gets the MSB of the codepoint

private static int

Returns:

character associated with the name, -1 if such character is not found and -2 if we should continue with the search.
getExtendedChar
(String
of the character to be found
name
,
int
name choice
choice
)

Getting the character with extended name of the form <....>.

public String
getExtendedName(int ch)

Retrieves the extended name

public String

Returns:

name of codepoint extended or 1.0
getExtendedOr10Name
(int
codepoint
ch
)

Gets the extended and 1.0 name when the most current unicode names fail

public int

Returns:

group index containing codepoint or the group before it.
getGroup
(int
The codepoint index.
codepoint
)

Gets the group index for the codepoint, or the group before it.

private synchronized int

Returns:

character with the tokenized argument name or -1 if character is not found
getGroupChar
(String
of the character
name
,
int choice)

Getting the character with the tokenized argument name

private int

Returns:

relative character in the group which matches name, otherwise if not found, -1 will be returned
getGroupChar
(int
index where the set of names reside in the group block
index
,
char[]
list of lengths of the strings
length
,
String
character name to search for
name
,
int
of either 1.0 or the most current unicode name
choice
)

Compares and retrieve character if name is found within the argument group

public int

Returns:

next index of the data string immediately after the lengths in terms of byte address
getGroupLengths
(int
of group string object in array
index
,
char[]
array to store the value of the string offsets
offsets
,
char[]
array to store the value of the string length
lengths
)

Reads a block of compressed lengths of 32 strings and expands them into offsets and lengths for each string.

public static int

Returns:

limit codepoint of the group
getGroupLimit
(int
most significant byte of the group
msb
)

Gets the maximum codepoint + 1 of the group

public static int

Returns:

minimum codepoint of the group
getGroupMin
(int
most significant byte of the group
msb
)

Gets the minimum codepoint of the group

public static int

Returns:

minimum codepoint in the group which codepoint belongs to
getGroupMinFromCodepoint
(int
The codepoint value.
codepoint
)

Gets the minimum codepoint of a group

public int

Returns:

the MSB of the group if gindex is valid, -1 otherwise
getGroupMSB
(int
group index
gindex
)

Gets the MSB from the group index

public String

Returns:

name of the group
getGroupName
(int
of the group name string in byte count
index
,
int
of the group name string
length
,
int
of Unicode 1.0 name or the most current name
choice
)

Gets the name of the argument group index.

public synchronized String
getGroupName(int
character to get the group name
ch
,
int
name choice selector to choose a unicode 1.0 or newer name
choice
)

Gets the group name of the character

public static int

Returns:

offset to a group
getGroupOffset
(int
The codepoint value.
codepoint
)

Gets the offset to a group

public void
getISOCommentCharacters(UnicodeSet
USet to receive characters. Existing contents are deleted.
set
)

Fills set with characters that are used in Unicode character names.

public int

Returns:

the maximum length of any codepoint name
getMaxCharNameLength
()

Gets the maximum length of any codepoint name.

public int

Returns:

the maximum length of any codepoint name
getMaxISOCommentLength
()

Gets the maximum length of any iso comments.

public String

Returns:

if code point is above 0x1fff, null is returned
getName
(int
the code point for which to get the name.
ch
,
int
Selector for which name to get.
choice
)

Retrieve the name of a Unicode code point.

private static int

Returns:

extended type it is associated with
getType
(int
character to be tested
ch
)

Gets the character extended type

private boolean
initNameSetsLengths()

Sets up the name sets and the calculation of the maximum lengths.

pack-priv boolean

Returns:

true if the group string offset has been set correctly
setAlgorithm
(UCharacterName.AlgorithmName[]
Algorithm information array
alg
)

Set the algorithm name information array

pack-priv boolean

Returns:

false if there is a data error
setGroup
(char[]
index information array
group
,
byte[]
name information array
groupstring
)

Sets the group name data

pack-priv boolean

Returns:

true if group size is set correctly
setGroupCountSize
(int
number of groups
count
,
int
size of group in char
size
)

Sets the number of group and size of each group in number of char

pack-priv boolean

Returns:

false if there is a data error
setToken
(char[]
array of tokens
token
,
byte[]
array of string values of the tokens
tokenstring
)

Sets the token data

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EXTENDED_CATEGORY_back to summary
pack-priv static final int EXTENDED_CATEGORY_

Extended category count

FILE_NAME_back to summary
private static final String FILE_NAME_

Default name of the name datafile

GROUP_MASK_back to summary
private static final int GROUP_MASK_

Mask to retrieve the offset for a particular character within a group

GROUP_SHIFT_back to summary
private static final int GROUP_SHIFT_

Shift count to retrieve group information

INSTANCEback to summary
public static final UCharacterName INSTANCE
LEAD_SURROGATE_back to summary
private static final int LEAD_SURROGATE_

Lead surrogate type

LINES_PER_GROUP_back to summary
public static final int LINES_PER_GROUP_

Number of lines per group 1 << GROUP_SHIFT_

m_algorithm_back to summary
private UCharacterName.AlgorithmName[] m_algorithm_
m_groupcount_back to summary
public int m_groupcount_

Maximum number of groups

m_groupinfo_back to summary
private char[] m_groupinfo_
m_grouplengths_back to summary
private char[] m_grouplengths_
m_groupoffsets_back to summary
private char[] m_groupoffsets_

Group use. Note - access must be synchronized.

m_groupsize_back to summary
pack-priv int m_groupsize_

Size of each groups

m_groupstring_back to summary
private byte[] m_groupstring_
m_ISOCommentSet_back to summary
private int[] m_ISOCommentSet_

Set of chars used in ISO comments. (regular & 1.0). Chars are platform-dependent (can be EBCDIC).

m_maxISOCommentLength_back to summary
private int m_maxISOCommentLength_

Maximum ISO comment length

m_maxNameLength_back to summary
private int m_maxNameLength_

Maximum name length

m_nameSet_back to summary
private int[] m_nameSet_

Set of chars used in character names (regular & 1.0). Chars are platform-dependent (can be EBCDIC).

m_tokenstring_back to summary
private byte[] m_tokenstring_
m_tokentable_back to summary
private char[] m_tokentable_

Data used in unames.icu

m_utilIntBuffer_back to summary
private int[] m_utilIntBuffer_

Utility int buffer

m_utilStringBuffer_back to summary
private StringBuffer m_utilStringBuffer_

Utility StringBuffer

NON_CHARACTER_back to summary
private static final int NON_CHARACTER_

Not a character type

OFFSET_HIGH_OFFSET_back to summary
private static final int OFFSET_HIGH_OFFSET_

Position of offsethigh in group information array

OFFSET_LOW_OFFSET_back to summary
private static final int OFFSET_LOW_OFFSET_

Position of offsetlow in group information array

SINGLE_NIBBLE_MAX_back to summary
private static final int SINGLE_NIBBLE_MAX_

Double nibble indicator, any nibble > this number has to be combined with its following nibble

TRAIL_SURROGATE_back to summary
private static final int TRAIL_SURROGATE_

Trail surrogate type

TYPE_NAMES_back to summary
private static final String[] TYPE_NAMES_

Type names used for extended names

UNKNOWN_TYPE_NAME_back to summary
private static final String UNKNOWN_TYPE_NAME_

Unknown type name

Constructor Detail

UCharacterNameback to summary
private UCharacterName() throws IOException

Protected constructor for use in UCharacter.

Exceptions
IOException:
thrown when data reading fails

Method Detail

addback to summary
private static void add(int[] set, char ch)

Adds a codepoint into a set of ints. Equivalent to SET_ADD.

Parameters
set:int[]

set to add to

ch:char

16 bit char to add

addback to summary
private static int add(int[] set, String str)

Adds all characters of the argument str and gets the length Equivalent to calcStringSetLength.

Parameters
set:int[]

set to add all chars of str to

str:String

string to add

addback to summary
private static int add(int[] set, StringBuffer str)

Adds all characters of the argument str and gets the length Equivalent to calcStringSetLength.

Parameters
set:int[]

set to add all chars of str to

str:StringBuffer

string to add

addAlgorithmNameback to summary
private int addAlgorithmName(int maxlength)

Adds all algorithmic names into the name set. Equivalent to part of calcAlgNameSetsLengths.

Parameters
maxlength:int

length to compare to

Returns:int

the maximum length of any possible algorithmic name if it is > maxlength, otherwise maxlength is returned.

addExtendedNameback to summary
private int addExtendedName(int maxlength)

Adds all extended names into the name set. Equivalent to part of calcExtNameSetsLengths.

Parameters
maxlength:int

length to compare to

Returns:int

the maxlength of any possible extended name.

addGroupNameback to summary
private int[] addGroupName(int offset, int length, byte[] tokenlength, int[] set)

Adds names of a group to the argument set. Equivalent to calcNameSetLength.

Parameters
offset:int

of the group name string in byte count

length:int

of the group name string

tokenlength:byte[]

array to store the length of each token

set:int[]

to add to

Returns:int[]

the length of the name string and the length of the group string parsed

addGroupNameback to summary
private void addGroupName(int maxlength)

Adds names of all group to the argument set. Sets the data member m_max*Length_. Method called only once. Equivalent to calcGroupNameSetsLength.

Parameters
maxlength:int

length to compare to

containsback to summary
private static boolean contains(int[] set, char ch)

Checks if a codepoint is a part of a set of ints. Equivalent to SET_CONTAINS.

Parameters
set:int[]

set to check in

ch:char

16 bit char to check

Returns:boolean

true if codepoint is part of the set, false otherwise

convertback to summary
private void convert(int[] set, UnicodeSet uset)

Converts the char set cset into a Unicode set uset. Equivalent to charSetToUSet.

Parameters
set:int[]

Set of 256 bit flags corresponding to a set of chars.

uset:UnicodeSet

USet to receive characters. Existing contents are deleted.

getAlgNameback to summary
private String getAlgName(int ch, int choice)

Gets the algorithmic name for the argument character

Parameters
ch:int

character to determine name for

choice:int

name choice

Returns:String

the algorithmic name or null if not found

getAlgorithmEndback to summary
public int getAlgorithmEnd(int index)

Gets the end of the range

Parameters
index:int

algorithm index

Returns:int

algorithm range end

getAlgorithmLengthback to summary
public int getAlgorithmLength()

Get the Algorithm range length

Returns:int

Algorithm range length

getAlgorithmNameback to summary
public String getAlgorithmName(int index, int codepoint)

Gets the Algorithmic name of the codepoint

Parameters
index:int

algorithmic range index

codepoint:int

The codepoint value.

Returns:String

algorithmic name of codepoint

getAlgorithmStartback to summary
public int getAlgorithmStart(int index)

Gets the start of the range

Parameters
index:int

algorithm index

Returns:int

algorithm range start

getCharFromNameback to summary
public int getCharFromName(int choice, String name)

Find a character by its name and return its code point value

Parameters
choice:int

selector to indicate if argument name is a Unicode 1.0 or the most current version

name:String

the name to search for

Returns:int

code point

getCharNameCharactersback to summary
public void getCharNameCharacters(UnicodeSet set)

Fills set with characters that are used in Unicode character names. Equivalent to uprv_getCharNameCharacters.

Parameters
set:UnicodeSet

USet to receive characters. Existing contents are deleted.

getCodepointMSBback to summary
public static int getCodepointMSB(int codepoint)

Gets the MSB of the codepoint

Parameters
codepoint:int

The codepoint value.

Returns:int

the MSB of the codepoint

getExtendedCharback to summary
private static int getExtendedChar(String name, int choice)

Getting the character with extended name of the form <....>.

Parameters
name:String

of the character to be found

choice:int

name choice

Returns:int

character associated with the name, -1 if such character is not found and -2 if we should continue with the search.

getExtendedNameback to summary
public String getExtendedName(int ch)

Retrieves the extended name

getExtendedOr10Nameback to summary
public String getExtendedOr10Name(int ch)

Gets the extended and 1.0 name when the most current unicode names fail

Parameters
ch:int

codepoint

Returns:String

name of codepoint extended or 1.0

getGroupback to summary
public int getGroup(int codepoint)

Gets the group index for the codepoint, or the group before it.

Parameters
codepoint:int

The codepoint index.

Returns:int

group index containing codepoint or the group before it.

getGroupCharback to summary
private synchronized int getGroupChar(String name, int choice)

Getting the character with the tokenized argument name

Parameters
name:String

of the character

Returns:int

character with the tokenized argument name or -1 if character is not found

getGroupCharback to summary
private int getGroupChar(int index, char[] length, String name, int choice)

Compares and retrieve character if name is found within the argument group

Parameters
index:int

index where the set of names reside in the group block

length:char[]

list of lengths of the strings

name:String

character name to search for

choice:int

of either 1.0 or the most current unicode name

Returns:int

relative character in the group which matches name, otherwise if not found, -1 will be returned

getGroupLengthsback to summary
public int getGroupLengths(int index, char[] offsets, char[] lengths)

Reads a block of compressed lengths of 32 strings and expands them into offsets and lengths for each string. Lengths are stored with a variable-width encoding in consecutive nibbles: If a nibble<0xc, then it is the length itself (0 = empty string). If a nibble>=0xc, then it forms a length value with the following nibble. The offsets and lengths arrays must be at least 33 (one more) long because there is no check here at the end if the last nibble is still used.

Parameters
index:int

of group string object in array

offsets:char[]

array to store the value of the string offsets

lengths:char[]

array to store the value of the string length

Returns:int

next index of the data string immediately after the lengths in terms of byte address

getGroupLimitback to summary
public static int getGroupLimit(int msb)

Gets the maximum codepoint + 1 of the group

Parameters
msb:int

most significant byte of the group

Returns:int

limit codepoint of the group

getGroupMinback to summary
public static int getGroupMin(int msb)

Gets the minimum codepoint of the group

Parameters
msb:int

most significant byte of the group

Returns:int

minimum codepoint of the group

getGroupMinFromCodepointback to summary
public static int getGroupMinFromCodepoint(int codepoint)

Gets the minimum codepoint of a group

Parameters
codepoint:int

The codepoint value.

Returns:int

minimum codepoint in the group which codepoint belongs to

getGroupMSBback to summary
public int getGroupMSB(int gindex)

Gets the MSB from the group index

Parameters
gindex:int

group index

Returns:int

the MSB of the group if gindex is valid, -1 otherwise

getGroupNameback to summary
public String getGroupName(int index, int length, int choice)

Gets the name of the argument group index. UnicodeData.txt uses ';' as a field separator, so no field can contain ';' as part of its contents. In unames.icu, it is marked as token[';'] == -1 only if the semicolon is used in the data file - which is iff we have Unicode 1.0 names or ISO comments or aliases. So, it will be token[';'] == -1 if we store U1.0 names/ISO comments/aliases although we know that it will never be part of a name. Equivalent to ICU4C's expandName.

Parameters
index:int

of the group name string in byte count

length:int

of the group name string

choice:int

of Unicode 1.0 name or the most current name

Returns:String

name of the group

getGroupNameback to summary
public synchronized String getGroupName(int ch, int choice)

Gets the group name of the character

Parameters
ch:int

character to get the group name

choice:int

name choice selector to choose a unicode 1.0 or newer name

getGroupOffsetback to summary
public static int getGroupOffset(int codepoint)

Gets the offset to a group

Parameters
codepoint:int

The codepoint value.

Returns:int

offset to a group

getISOCommentCharactersback to summary
public void getISOCommentCharacters(UnicodeSet set)

Fills set with characters that are used in Unicode character names. Equivalent to uprv_getISOCommentCharacters.

Parameters
set:UnicodeSet

USet to receive characters. Existing contents are deleted.

getMaxCharNameLengthback to summary
public int getMaxCharNameLength()

Gets the maximum length of any codepoint name. Equivalent to uprv_getMaxCharNameLength.

Returns:int

the maximum length of any codepoint name

getMaxISOCommentLengthback to summary
public int getMaxISOCommentLength()

Gets the maximum length of any iso comments. Equivalent to uprv_getMaxISOCommentLength.

Returns:int

the maximum length of any codepoint name

getNameback to summary
public String getName(int ch, int choice)

Retrieve the name of a Unicode code point. Depending on choice, the character name written into the buffer is the "modern" name or the name that was defined in Unicode version 1.0. The name contains only "invariant" characters like A-Z, 0-9, space, and '-'.

Parameters
ch:int

the code point for which to get the name.

choice:int

Selector for which name to get.

Returns:String

if code point is above 0x1fff, null is returned

getTypeback to summary
private static int getType(int ch)

Gets the character extended type

Parameters
ch:int

character to be tested

Returns:int

extended type it is associated with

initNameSetsLengthsback to summary
private boolean initNameSetsLengths()

Sets up the name sets and the calculation of the maximum lengths. Equivalent to calcNameSetsLengths.

setAlgorithmback to summary
pack-priv boolean setAlgorithm(UCharacterName.AlgorithmName[] alg)

Set the algorithm name information array

Parameters
alg:UCharacterName.AlgorithmName[]

Algorithm information array

Returns:boolean

true if the group string offset has been set correctly

setGroupback to summary
pack-priv boolean setGroup(char[] group, byte[] groupstring)

Sets the group name data

Parameters
group:char[]

index information array

groupstring:byte[]

name information array

Returns:boolean

false if there is a data error

setGroupCountSizeback to summary
pack-priv boolean setGroupCountSize(int count, int size)

Sets the number of group and size of each group in number of char

Parameters
count:int

number of groups

size:int

size of group in char

Returns:boolean

true if group size is set correctly

setTokenback to summary
pack-priv boolean setToken(char[] token, byte[] tokenstring)

Sets the token data

Parameters
token:char[]

array of tokens

tokenstring:byte[]

array of string values of the tokens

Returns:boolean

false if there is a data error

com.ibm.icu.impl back to summary

pack-priv final Class UCharacterName.AlgorithmName

extends Object
Class Inheritance

Algorithmic name class

Field Summary

Modifier and TypeField and Description
private char[]
private byte[]
private String
private int
private int
m_rangestart_

Algorithmic data information

private byte
private int[]
m_utilIntBuffer_

Utility int buffer

private StringBuffer
m_utilStringBuffer_

Utility StringBuffer

private byte
pack-priv static final int
TYPE_0_

Constant type value of the different AlgorithmName

pack-priv static final int

Constructor Summary

AccessConstructor and Description
pack-priv
AlgorithmName()

Constructor

Method Summary

Modifier and TypeMethod and Description
pack-priv int

Returns:

the length that is either maxlength of the length of this algorithm name if it is longer than maxlength
add
(int[]
int set to add the chars of the algorithm names into
set
,
int
maximum length to compare to
maxlength
)

Adds all chars in the set of algorithmic names into the set.

pack-priv void
appendName(int
code point
ch
,
StringBuffer
StringBuffer to append to
str
)

Appends algorithm name of code point into StringBuffer.

private boolean

Returns:

true if string matches
compareFactorString
(int[]
array with each index corresponding to each factor block
index
,
int
index array length
length
,
String
string to compare with
str
,
int
of str to start comparison
offset
)

Compares the indexth string in each of the argument factor block with the argument string

pack-priv boolean
contains(int
code point
ch
)

Checks if code point lies in Algorithm object at index

pack-priv int

Returns:

the algorithmic char or -1 otherwise.
getChar
(String name)

Gets the character for the argument algorithmic name

private String

Returns:

the combined string of the array of indexth factor string in factor block
getFactorString
(int[]
array with each index corresponding to each factor block
index
,
int
length of the array index
length
)

Gets the indexth string in each of the argument factor block

pack-priv boolean

Returns:

true if factors are valid
setFactor
(char[]
Array of factor
factor
)

Sets the factor data

pack-priv boolean

Returns:

true if values are set
setFactorString
(byte[]
variant factorized name data
string
)

Sets the variant factorized name data

pack-priv boolean

Returns:

true if values are valid
setInfo
(int
starting code point that lies within this name group
rangestart
,
int
end code point that lies within this name group
rangeend
,
byte
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
type
,
byte
algorithmic variant
variant
)

Sets the information for accessing the algorithmic names

pack-priv boolean

Returns:

true if prefix is set
setPrefix
(String prefix)

Sets the name prefix

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

m_factor_back to summary
private char[] m_factor_
m_factorstring_back to summary
private byte[] m_factorstring_
m_prefix_back to summary
private String m_prefix_
m_rangeend_back to summary
private int m_rangeend_
m_rangestart_back to summary
private int m_rangestart_

Algorithmic data information

m_type_back to summary
private byte m_type_
m_utilIntBuffer_back to summary
private int[] m_utilIntBuffer_

Utility int buffer

m_utilStringBuffer_back to summary
private StringBuffer m_utilStringBuffer_

Utility StringBuffer

m_variant_back to summary
private byte m_variant_
TYPE_0_back to summary
pack-priv static final int TYPE_0_

Constant type value of the different AlgorithmName

TYPE_1_back to summary
pack-priv static final int TYPE_1_

Constructor Detail

AlgorithmNameback to summary
pack-priv AlgorithmName()

Constructor

Method Detail

addback to summary
pack-priv 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[]

int set to add the chars of the algorithm names into

maxlength:int

maximum length to compare to

Returns:int

the length that is either maxlength of the length of this algorithm name if it is longer than maxlength

appendNameback to summary
pack-priv 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:int

code point

str:StringBuffer

StringBuffer to append to

compareFactorStringback to summary
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:int[]

array with each index corresponding to each factor block

length:int

index array length

str:String

string to compare with

offset:int

of str to start comparison

Returns:boolean

true if string matches

containsback to summary
pack-priv boolean contains(int ch)

Checks if code point lies in Algorithm object at index

Parameters
ch:int

code point

getCharback to summary
pack-priv int getChar(String name)

Gets the character for the argument algorithmic name

Returns:int

the algorithmic char or -1 otherwise.

getFactorStringback to summary
private String getFactorString(int[] index, int length)

Gets the indexth string in each of the argument factor block

Parameters
index:int[]

array with each index corresponding to each factor block

length:int

length of the array index

Returns:String

the combined string of the array of indexth factor string in factor block

setFactorback to summary
pack-priv boolean setFactor(char[] factor)

Sets the factor data

Parameters
factor:char[]

Array of factor

Returns:boolean

true if factors are valid

setFactorStringback to summary
pack-priv boolean setFactorString(byte[] string)

Sets the variant factorized name data

Parameters
string:byte[]

variant factorized name data

Returns:boolean

true if values are set

setInfoback to summary
pack-priv boolean setInfo(int rangestart, int rangeend, byte type, byte variant)

Sets the information for accessing the algorithmic names

Parameters
rangestart:int

starting code point that lies within this name group

rangeend:int

end code point that lies within this name group

type:byte

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:byte

algorithmic variant

Returns:boolean

true if values are valid

setPrefixback to summary
pack-priv boolean setPrefix(String prefix)

Sets the name prefix

Returns:boolean

true if prefix is set