if (direction != Bidi.MIXED) { if(line.isLeftToRight()) { return s; } else {
/** * Return true if the line is not left-to-right or right-to-left. This means * it either has mixed runs of left-to-right and right-to-left text, or the * base direction differs from the direction of the only run of text. * * @return true if the line is not left-to-right or right-to-left. * * @throws IllegalStateException if this call is not preceded by a successful * call to <code>setPara</code> * @stable ICU 3.8 */ public boolean isMixed() { return (!isLeftToRight() && !isRightToLeft()); }