public final class UnicodeBidiAlgorithm extends java.lang.Object implements BidiConstants
The UnicodeBidiAlgorithm
class implements functionality prescribed by
the Unicode Bidirectional Algorithm, Unicode Standard Annex #9.
This work was originally authored by Glenn Adams (gadams@apache.org).
Modifier and Type | Method and Description |
---|---|
static int[] |
resolveLevels(java.lang.CharSequence cs,
Direction defaultLevel)
Resolve the directionality levels of each character in a character seqeunce.
|
static int[] |
resolveLevels(int[] chars,
int[] classes,
int defaultLevel,
int[] levels,
boolean useRuleL1)
Resolve the directionality levels of each character in a character seqeunce.
|
static int[] |
resolveLevels(int[] chars,
int defaultLevel,
int[] levels)
Resolve the directionality levels of each character in a character seqeunce.
|
public static int[] resolveLevels(java.lang.CharSequence cs, Direction defaultLevel)
cs
- input character sequence representing a UTF-16 encoded stringdefaultLevel
- the default paragraph level, which must be zero (LR) or one (RL)public static int[] resolveLevels(int[] chars, int defaultLevel, int[] levels)
chars
- array of input characters represented as unicode scalar valuesdefaultLevel
- the default paragraph level, which must be zero (LR) or one (RL)levels
- array to receive levels, one for each character in chars arraypublic static int[] resolveLevels(int[] chars, int[] classes, int defaultLevel, int[] levels, boolean useRuleL1)
chars
- array of input characters represented as unicode scalar valuesclasses
- array containing one bidi class per character in chars arraydefaultLevel
- the default paragraph level, which must be zero (LR) or one (RL)levels
- array to receive levels, one for each character in chars arrayuseRuleL1
- true if rule L1 should be usedCopyright 1999-2017 The Apache Software Foundation. All Rights Reserved.