| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | TransliteratorIDParser.SingleID
A structure containing the canonicalized data of a filtered ID, that is, a basic ID optionally with a filter. |
| private static class | TransliteratorIDParser.Specs
A structure containing the parsed data of a filtered ID, that is, a basic ID optionally with a filter. |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final char | |
| private static final int | |
| private static final char | |
| private static final char | |
| private static final int | |
| private static final Map | |
| private static final char | |
| private static final char |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public static String[] | Returns: an array of 4 strings: source, target, variant, and isSourcePresent. If the source is not present, ANY will be given as the source, and isSourcePresent will be null. Otherwise isSourcePresent will be non-null. The target may be empty if the id is not well-formed. The variant may be empty.the id string, in any of several forms id)Parse an ID into pieces. |
| pack-priv static List | Returns: Actual transliterators for the list of SingleIDslist vector of SingleID objects. idsReturns the list of Transliterator objects for the given list of SingleID objects. |
| public static boolean | Returns: true if the parse succeeds, that is, if the entire id is consumed without syntax error.the pattern the parse id, int the direction. dir, StringBuffer OUTPUT parameter that receives the canonical ID,
consisting of canonical IDs for all elements, as returned by
parseSingleID(), separated by semicolons. Previous contents
are discarded. canonID, List<TransliteratorIDParser.OUTPUT parameter that receives a list of SingleID
objects representing the parsed IDs. Previous contents are
discarded. list,OUTPUT parameter that receives a pointer to
a newly created global filter for this ID in this direction, or
null if there is none. globalFilter)Parse a compound ID, consisting of an optional forward global filter, a separator, one or more single IDs delimited by separators, an an optional reverse global filter. |
| public static TransliteratorIDParser. | Returns: a SingleID object or null if the parse failsthe id to be parsed id, int[] INPUT-OUTPUT parameter. On input, the position of
the first character to parse. On output, the position after
the last character parsed. pos)Parse a filter ID, that is, an ID of the general form "[f1] s1-t1/v1", with the filters optional, and the variants optional. |
| private static TransliteratorIDParser. | Returns: a Specs object, or null if the parse failed. If neither source nor target was seen in the parsed id, then the parse fails. If allowFilter is true, then the parsed filter pattern is returned in the Specs object, otherwise the returned filter reference is null. If the parse fails for any reason null is returned.the id string, in any of several forms id, int[] INPUT-OUTPUT parameter. On input, pos[0] is the
offset of the first character to parse in id. On output,
pos[0] is the offset after the last parsed character. If the
parse failed, pos[0] will be unchanged. pos, boolean if true, a UnicodeSet pattern is allowed
at any location between specs or delimiters, and is returned
as the fifth string in the array. allowFilter)Parse an ID into component pieces. |
| public static UnicodeSet | Returns: a UnicodeSet object or null. A non-null results indicates a successful parse, regardless of whether the filter applies to the given direction. The caller should discard it if withParens != (dir == REVERSE).the pattern the parse id, int[] INPUT-OUTPUT parameter. On input, the position of
the first character to parse. On output, the position after
the last character parsed. pos, int the direction. dir, int[] INPUT-OUTPUT parameter. On entry, if
withParens[0] is 0, then parens are disallowed. If it is 1,
then parens are requires. If it is -1, then parens are
optional, and the return result will be set to 0 or 1. withParens, StringBuffer OUTPUT parameter. The pattern for the filter
added to the canonID, either at the end, if dir is FORWARD, or
at the start, if dir is REVERSE. The pattern will be enclosed
in parentheses if appropriate, and will be suffixed with an
ID_DELIM character. May be null. canonID)Parse a global filter of the form "[f]" or "([f])", depending on 'withParens'. |
| public static TransliteratorIDParser. | Returns: a SingleID object or nullthe id to be parsed id, int[] INPUT-OUTPUT parameter. On input, the position of
the first character to parse. On output, the position after
the last character parsed. pos, int the direction. If the direction is REVERSE then the
SingleID is constructed for the reverse direction. dir)Parse a single ID, that is, an ID of the general form "[f1] s1-t1/v1 ([f2] s2-t3/v2)", with the parenthesized element optional, the filters optional, and the variants optional. |
| public static void | registerSpecialInverse(String
the target against which to register the inverse target, String the inverse of target, that is
Any-target.getInverse() => Any-inverseTarget inverseTarget, boolean if true, register the reverse relation
as well, that is, Any-inverseTarget.getInverse() => Any-target bidirectional)Register two targets as being inverses of one another. |
| private static TransliteratorIDParser. | Returns: a SingleID; never returns null. Returned object always has 'filter' field of null.Givens a Spec object, convert it to a SingleID object. |
| private static TransliteratorIDParser. | Returns: a SingleID or null. Returned object always has 'filter' field of null.Given a Specs object, return a SingleID representing the special inverse of that ID. If there is no special inverse then return null. |
| public static String |
| ANY | back to summary |
|---|---|
| private static final String ANY | |
| CLOSE_REV | back to summary |
|---|---|
| private static final char CLOSE_REV | |
| FORWARD | back to summary |
|---|---|
| private static final int FORWARD | |
| ID_DELIM | back to summary |
|---|---|
| private static final char ID_DELIM | |
| OPEN_REV | back to summary |
|---|---|
| private static final char OPEN_REV | |
| REVERSE | back to summary |
|---|---|
| private static final int REVERSE | |
| SPECIAL_INVERSES | back to summary |
|---|---|
| private static final Map<CaseInsensitiveString, String> SPECIAL_INVERSES | |
| TARGET_SEP | back to summary |
|---|---|
| private static final char TARGET_SEP | |
| VARIANT_SEP | back to summary |
|---|---|
| private static final char VARIANT_SEP | |
| TransliteratorIDParser | back to summary |
|---|---|
| pack-priv TransliteratorIDParser() | |
| IDtoSTV | back to summary |
|---|---|
| public static String[] IDtoSTV(String id) Parse an ID into pieces. Take IDs of the form T, T/V, S-T, S-T/V, or S/V-T. If the source is missing, return a source of ANY.
| |
| instantiateList | back to summary |
|---|---|
| pack-priv static List Returns the list of Transliterator objects for the given list of SingleID objects.
| |
| parseCompoundID | back to summary |
|---|---|
| public static boolean parseCompoundID(String id, int dir, StringBuffer canonID, List<TransliteratorIDParser. Parse a compound ID, consisting of an optional forward global filter, a separator, one or more single IDs delimited by separators, an an optional reverse global filter. The separator is a semicolon. The global filters are UnicodeSet patterns. The reverse global filter must be enclosed in parentheses.
| |
| parseFilterID | back to summary |
|---|---|
| public static TransliteratorIDParser. Parse a filter ID, that is, an ID of the general form "[f1] s1-t1/v1", with the filters optional, and the variants optional.
| |
| parseFilterID | back to summary |
|---|---|
| private static TransliteratorIDParser. Parse an ID into component pieces. Take IDs of the form T, T/V, S-T, S-T/V, or S/V-T. If the source is missing, return a source of ANY.
| |
| parseGlobalFilter | back to summary |
|---|---|
| public static UnicodeSet parseGlobalFilter(String id, int[] pos, int dir, int[] withParens, StringBuffer canonID) Parse a global filter of the form "[f]" or "([f])", depending on 'withParens'.
| |
| parseSingleID | back to summary |
|---|---|
| public static TransliteratorIDParser. Parse a single ID, that is, an ID of the general form "[f1] s1-t1/v1 ([f2] s2-t3/v2)", with the parenthesized element optional, the filters optional, and the variants optional.
| |
| registerSpecialInverse | back to summary |
|---|---|
| public static void registerSpecialInverse(String target, String inverseTarget, boolean bidirectional) Register two targets as being inverses of one another. For example, calling registerSpecialInverse("NFC", "NFD", true) causes Transliterator to form the following inverse relationships: NFC => NFD Any-NFC => Any-NFD NFD => NFC Any-NFD => Any-NFC(Without the special inverse registration, the inverse of NFC would be NFC-Any.) Note that NFD is shorthand for Any-NFD, but that the presence or absence of "Any-" is preserved. The relationship is symmetrical; registering (a, b) is equivalent to registering (b, a). The relevant IDs must still be registered separately as factories or classes. Only the targets are specified. Special inverses always have the form Any-Target1 <=> Any-Target2. The target should have canonical casing (the casing desired to be produced when an inverse is formed) and should contain no whitespace or other extraneous characters. | |
| specsToID | back to summary |
|---|---|
| private static TransliteratorIDParser. Givens a Spec object, convert it to a SingleID object. The Spec object is a more unprocessed parse result. The SingleID object contains information about canonical and basic IDs.
| |
| specsToSpecialInverse | back to summary |
|---|---|
| private static TransliteratorIDParser. Given a Specs object, return a SingleID representing the special inverse of that ID. If there is no special inverse then return null.
| |
| STVtoID | back to summary |
|---|---|
| public static String STVtoID(String source, String target, String variant) Given source, target, and variant strings, concatenate them into a full ID. If the source is empty, then "Any" will be used for the source, so the ID will always be of the form s-t/v or s-t. | |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Transliterator |
| basicID | back to summary |
|---|---|
| public String basicID | |
| canonID | back to summary |
|---|---|
| public String canonID | |
| filter | back to summary |
|---|---|
| public String filter | |
| SingleID | back to summary |
|---|---|
| pack-priv SingleID(String c, String b, String f) | |
| SingleID | back to summary |
|---|---|
| pack-priv SingleID(String c, String b) | |
| getInstance | back to summary |
|---|---|
| pack-priv Transliterator getInstance() | |
| Modifier and Type | Field and Description |
|---|---|
| public String | |
| public boolean | |
| public String | |
| public String | |
| public String |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| filter | back to summary |
|---|---|
| public String filter | |
| sawSource | back to summary |
|---|---|
| public boolean sawSource | |
| source | back to summary |
|---|---|
| public String source | |
| target | back to summary |
|---|---|
| public String target | |
| variant | back to summary |
|---|---|
| public String variant | |
| Specs | back to summary |
|---|---|
| pack-priv Specs(String s, String t, String v, boolean sawS, String f) | |