Package com.google.gwt.i18n.shared
Class DirectionEstimator
java.lang.Object
com.google.gwt.i18n.shared.DirectionEstimator
- Direct Known Subclasses:
AnyRtlDirectionEstimator
,FirstStrongDirectionEstimator
,WordCountDirectionEstimator
Interface for direction estimators.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionestimateDirection
(SafeHtml html) Estimates the direction of a SafeHtml.abstract HasDirection.Direction
estimateDirection
(String str) Estimates the direction of a plain-text string.estimateDirection
(String str, boolean isHtml) Estimates the direction of a string.
-
Constructor Details
-
DirectionEstimator
public DirectionEstimator()
-
-
Method Details
-
estimateDirection
Estimates the direction of a plain-text string.- Parameters:
str
- The string to check.- Returns:
str
's estimated direction.
-
estimateDirection
Estimates the direction of a string.- Parameters:
str
- The string to check.isHtml
- Whetherstr
is HTML / HTML-escaped.false
means thatstr
is plain-text.- Returns:
str
's estimated direction.
-