public static final class BidiFormatter.Builder extends Object
| Constructor and Description |
|---|
BidiFormatter.Builder(boolean rtlContext)
Constructor
|
BidiFormatter.Builder(Dir contextDir)
Constructor
|
BidiFormatter.Builder(com.ibm.icu.util.ULocale locale)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
BidiFormatter.Builder |
alwaysSpan(boolean alwaysSpan)
Specifies whether the
BidiFormatter.spanWrap(java.lang.String, boolean, boolean) and BidiFormatter.spanWrapWithKnownDir(com.google.template.soy.data.Dir, java.lang.String, boolean, boolean) methods of the
BidiFormatter to be built should produce a stable span structure, i.e. |
BidiFormatter |
build() |
BidiFormatter.Builder |
stereoReset(boolean stereoReset)
Specifies whether the BidiFormatter to be built should also "reset" directionality before a
string being bidi-wrapped, not just after it.
|
public BidiFormatter.Builder(@Nullable Dir contextDir)
contextDir - The context directionality. Must not be NEUTRAL. It can be (Dir) null to
indicate that the context is unknown, but this is not recommended: the wrapping methods
then wrap text of either directionality, and cannot "reset" the directionality back to
the context.public BidiFormatter.Builder(boolean rtlContext)
rtlContext - Whether the context directionality is RTLpublic BidiFormatter.Builder(com.ibm.icu.util.ULocale locale)
locale - The context localepublic BidiFormatter.Builder alwaysSpan(boolean alwaysSpan)
BidiFormatter.spanWrap(java.lang.String, boolean, boolean) and BidiFormatter.spanWrapWithKnownDir(com.google.template.soy.data.Dir, java.lang.String, boolean, boolean) methods of the
BidiFormatter to be built should produce a stable span structure, i.e. wrap the string in a
span even when its directionality does not need to be declared. The default is false.public BidiFormatter.Builder stereoReset(boolean stereoReset)
public BidiFormatter build()