| java.lang.Object com.ibm.icu.impl.UPropertyAliases
UPropertyAliases | final public class UPropertyAliases implements ICUBinary.Authenticate(Code) | | Wrapper for the pnames.icu binary data file. This data file is
imported from icu4c. It contains property and property value
aliases from the UCD files PropertyAliases.txt and
PropertyValueAliases.txt. The file is built by the icu4c tool
genpname. It must be built on an ASCII big-endian platform to be
usable in icu4j.
This class performs two functions.
(1) It can import the flat binary data into a tree of usable
objects.
(2) It provides an API to access the tree of objects.
Needless to say, this class is tightly coupled to the binary format
of icu4c's pnames.icu file.
Each time a UPropertyAliases is constructed, the pnames.icu file is
read, parsed, and a data tree assembled. Clients should create one
singleton instance and cache it.
author: Alan Liu since: ICU 2.4 |
Constructor Summary | |
public | UPropertyAliases() Constructs a UPropertyAliases object. |
Method Summary | |
public static int | compare(String stra, String strb) Compare two property names, returning <0, 0, or >0. | public int | getPropertyEnum(String propertyAlias) Return a property enum given one of its property names. | public String | getPropertyName(int property, int nameChoice) Return a property name given a property enum. | public int | getPropertyValueEnum(int property, String valueAlias) Return a value enum given one of its value names and the
corresponding property alias. | public String | getPropertyValueName(int property, int value, int nameChoice) Return a value name given a property enum and a value enum. | public boolean | isDataVersionAcceptable(byte version) Return true if the given data version can be used. |
UPropertyAliases | public UPropertyAliases() throws IOException(Code) | | Constructs a UPropertyAliases object. The binary file
DATA_FILE_NAME is read from the jar/classpath and unflattened
into member variables of this object.
|
compare | public static int compare(String stra, String strb)(Code) | | Compare two property names, returning <0, 0, or >0. The
comparison is that described as "loose" matching in the
Property*Aliases.txt files.
|
getPropertyEnum | public int getPropertyEnum(String propertyAlias)(Code) | | Return a property enum given one of its property names.
|
getPropertyName | public String getPropertyName(int property, int nameChoice)(Code) | | Return a property name given a property enum. Multiple
names may be available for each property; the nameChoice
selects among them.
|
getPropertyValueEnum | public int getPropertyValueEnum(int property, String valueAlias)(Code) | | Return a value enum given one of its value names and the
corresponding property alias.
|
getPropertyValueName | public String getPropertyValueName(int property, int value, int nameChoice)(Code) | | Return a value name given a property enum and a value enum.
Multiple names may be available for each value; the nameChoice
selects among them.
|
isDataVersionAcceptable | public boolean isDataVersionAcceptable(byte version)(Code) | | Return true if the given data version can be used.
|
|
|