Class FirstStrongDirectionEstimator

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

public class FirstStrongDirectionEstimator extends DirectionEstimator
Direction estimator that uses the "first strong" heuristic.
  • Constructor Details

    • FirstStrongDirectionEstimator

      public FirstStrongDirectionEstimator()
  • Method Details

    • get

      public static FirstStrongDirectionEstimator get()
      Get an instance of FirstStrongDirectionEstimator.
      Returns:
      An instance of FirstStrongDirectionEstimator.
    • estimateDirection

      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.
      Specified by:
      estimateDirection in class DirectionEstimator
      Parameters:
      str - Input string.
      Returns:
      Direction The estimated direction of str.