Package com.ibm.icu.impl.text
Class RbnfScannerProviderImpl
java.lang.Object
com.ibm.icu.impl.text.RbnfScannerProviderImpl
- All Implemented Interfaces:
RbnfLenientScannerProvider
@Deprecated
public class RbnfScannerProviderImpl
extends Object
implements RbnfLenientScannerProvider
Deprecated.
This API is ICU internal only.
Returns RbnfLenientScanners that use the old RuleBasedNumberFormat
implementation behind setLenientParseMode, which is based on Collator.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
Deprecated. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Map
<String, RbnfLenientScanner> Deprecated.private static final boolean
Deprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected RbnfLenientScanner
createScanner
(ULocale locale, String extras) Deprecated.This API is ICU internal only.Deprecated.This API is ICU internal only.
-
Field Details
-
DEBUG
private static final boolean DEBUGDeprecated. -
cache
Deprecated.
-
-
Constructor Details
-
RbnfScannerProviderImpl
Deprecated.This API is ICU internal only.
-
-
Method Details
-
get
Deprecated.This API is ICU internal only.Returns a collation-based scanner. Only primary differences are treated as significant. This means that case differences, accent differences, alternate spellings of the same letter (e.g., ae and a-umlaut in German), ignorable characters, etc. are ignored in matching the text. In many cases, numerals will be accepted in place of words or phrases as well. For example, all of the following will correctly parse as 255 in English in lenient-parse mode:
"two hundred fifty-five"
"two hundred fifty five"
"TWO HUNDRED FIFTY-FIVE"
"twohundredfiftyfive"
"2 hundred fifty-5" The Collator used is determined by the locale that was passed to this object on construction. The description passed to this object on construction may supply additional collation rules that are appended to the end of the default collator for the locale, enabling additional equivalences (such as adding more ignorable characters or permitting spelled-out version of symbols; see the demo program for examples). It's important to emphasize that even strict parsing is relatively lenient: it will accept some text that it won't produce as output. In English, for example, it will correctly parse "two hundred zero" and "fifteen hundred".- Specified by:
get
in interfaceRbnfLenientScannerProvider
- Parameters:
locale
- the locale to provide the default lenient rules.extras
- extra collation rules- Returns:
- the lenient scanner, or null
-
createScanner
Deprecated.This API is ICU internal only.
-