public class

FirstStrongDirectionEstimator

extends DirectionEstimator
java.lang.Object
   ↳ com.google.gwt.i18n.shared.DirectionEstimator
     ↳ com.google.gwt.i18n.shared.FirstStrongDirectionEstimator

Class Overview

Direction estimator that uses the "first strong" heuristic.

Summary

Public Constructors
FirstStrongDirectionEstimator()
Public Methods
HasDirection.Direction estimateDirection(String str)
Estimates the direction of a given string using the "first strong" heuristic: The return value is determined by the first character in the string with strong directionality.
static FirstStrongDirectionEstimator get()
Get an instance of FirstStrongDirectionEstimator.
[Expand]
Inherited Methods
From class com.google.gwt.i18n.shared.DirectionEstimator
From class java.lang.Object

Public Constructors

public FirstStrongDirectionEstimator ()

Public Methods

public HasDirection.Direction estimateDirection (String str)

Estimates the direction of a given string using the "first strong" heuristic: The return value is determined by the first character in the string with strong directionality. If there is no such character, the return value is DEFAULT.

Parameters
str Input string.
Returns
  • Direction The estimated direction of str.

public static FirstStrongDirectionEstimator get ()

Get an instance of FirstStrongDirectionEstimator.

Returns
  • An instance of FirstStrongDirectionEstimator.