com.google.gwt.i18n.shared

## Class DirectionEstimator

- java.lang.Object
- - com.google.gwt.i18n.shared.DirectionEstimator

Direct Known Subclasses:
  AnyRtlDirectionEstimator, FirstStrongDirectionEstimator, WordCountDirectionEstimator

    public abstract class DirectionEstimator
    extends java.lang.Object

Interface for direction estimators.

### Constructor Summary

Constructors
Constructor and Description
`DirectionEstimator()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`HasDirection.Direction` `estimateDirection(SafeHtml html)` Estimates the direction of a SafeHtml.
`abstract HasDirection.Direction` `estimateDirection(java.lang.String str)` Estimates the direction of a plain-text string.
`HasDirection.Direction` `estimateDirection(java.lang.String str, boolean isHtml)` Estimates the direction of a string.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DirectionEstimator

    public DirectionEstimator()

### Method Detail

#### estimateDirection

    public abstract HasDirection.Direction estimateDirection(java.lang.String str)

Estimates the direction of a plain-text string.

Parameters:
  `str` - The string to check.
Returns:
  `str`'s estimated direction.

#### estimateDirection

    public HasDirection.Direction estimateDirection(java.lang.String str,
                                                    boolean isHtml)

Estimates the direction of a string.

Parameters:
  `str` - The string to check.
  `isHtml` - Whether `str` is HTML / HTML-escaped. `false` means that `str` is plain-text.
Returns:
  `str`'s estimated direction.

#### estimateDirection

    public HasDirection.Direction estimateDirection(SafeHtml html)

Estimates the direction of a SafeHtml.

Parameters:
  `html` - The string to check.
Returns:
  `html`'s estimated direction.