Class DirectionEstimator

java.lang.Object
com.google.gwt.i18n.shared.DirectionEstimator
Direct Known Subclasses:
AnyRtlDirectionEstimator, FirstStrongDirectionEstimator, WordCountDirectionEstimator

public abstract class DirectionEstimator extends Object
Interface for direction estimators.
  • Constructor Details

    • DirectionEstimator

      public DirectionEstimator()
  • Method Details

    • estimateDirection

      public abstract HasDirection.Direction estimateDirection(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(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.