Lines Matching defs:heuristic

81      * The default text direction heuristic.
185 * By default, uses the first-strong heuristic.
187 * @param heuristic the {@code TextDirectionHeuristic} to use.
190 public Builder setTextDirectionHeuristic(TextDirectionHeuristicCompat heuristic) {
191 mTextDirectionHeuristicCompat = heuristic;
258 * @param heuristic The default text direction heuristic.
260 private BidiFormatter(boolean isRtlContext, int flags, TextDirectionHeuristicCompat heuristic) {
263 mDefaultTextDirectionHeuristicCompat = heuristic;
288 * given explicitly by a heuristic to estimate the {@code str}'s directionality.
291 * @param heuristic The text direction heuristic that will be used to estimate the {@code str}'s
296 private String markAfter(String str, TextDirectionHeuristicCompat heuristic) {
297 final boolean isRtl = heuristic.isRtl(str, 0, str.length());
315 * directionality is given explicitly by a heuristic to estimate the {@code str}'s directionality.
318 * @param heuristic The text direction heuristic that will be used to estimate the {@code str}'s
323 private String markBefore(String str, TextDirectionHeuristicCompat heuristic) {
324 final boolean isRtl = heuristic.isRtl(str, 0, str.length());
336 * Estimates the directionality of a string using the default text direction heuristic.
369 * @param heuristic The algorithm to be used to estimate the string's overall direction.
375 public String unicodeWrap(String str, TextDirectionHeuristicCompat heuristic, boolean isolate) {
377 final boolean isRtl = heuristic.isRtl(str, 0, str.length());
402 * @param heuristic The algorithm to be used to estimate the string's overall direction.
405 public String unicodeWrap(String str, TextDirectionHeuristicCompat heuristic) {
406 return unicodeWrap(str, heuristic, true /* isolate */);