BidiFormatter.Builder


public static final class BidiFormatter.Builder
extends Object

java.lang.Object
   ↳ android.text.BidiFormatter.Builder


A class for building a BidiFormatter with non-default options.

Summary

Public constructors

Builder()

Constructor.

Builder(boolean rtlContext)

Constructor.

Builder(Locale locale)

Constructor.

Public methods

BidiFormatter build()
BidiFormatter.Builder setTextDirectionHeuristic(TextDirectionHeuristic heuristic)

Specifies the default directionality estimation algorithm to be used by the BidiFormatter.

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.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

Added in API level 18
public Builder ()

Constructor.

Builder

Added in API level 18
public Builder (boolean rtlContext)

Constructor.

Parameters
rtlContext boolean: Whether the context directionality is RTL.

Builder

Added in API level 18
public Builder (Locale locale)

Constructor.

Parameters
locale Locale: The context locale.

Public methods

build

Added in API level 18
public BidiFormatter build ()

Returns
BidiFormatter A BidiFormatter with the specified options.

setTextDirectionHeuristic

Added in API level 18
public BidiFormatter.Builder setTextDirectionHeuristic (TextDirectionHeuristic heuristic)

Specifies the default directionality estimation algorithm to be used by the BidiFormatter. By default, uses the first-strong heuristic.

Parameters
heuristic TextDirectionHeuristic: the TextDirectionHeuristic to use.

Returns
BidiFormatter.Builder the builder itself.

stereoReset

Added in API level 18
public 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. The default is true.

Parameters
stereoReset boolean