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 java.lang.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 Classes Modifier and Type Class Description private static class
RbnfScannerProviderImpl.RbnfLenientScannerImpl
Deprecated.
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,RbnfLenientScanner>
cache
Deprecated.private static boolean
DEBUG
Deprecated.
-
Constructor Summary
Constructors Constructor Description RbnfScannerProviderImpl()
Deprecated.This API is ICU internal only.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected RbnfLenientScanner
createScanner(ULocale locale, java.lang.String extras)
Deprecated.This API is ICU internal only.RbnfLenientScanner
get(ULocale locale, java.lang.String extras)
Deprecated.This API is ICU internal only.
-
-
-
Field Detail
-
DEBUG
private static final boolean DEBUG
Deprecated.
-
cache
private java.util.Map<java.lang.String,RbnfLenientScanner> cache
Deprecated.
-
-
Method Detail
-
get
@Deprecated public RbnfLenientScanner get(ULocale locale, java.lang.String extras)
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 protected RbnfLenientScanner createScanner(ULocale locale, java.lang.String extras)
Deprecated.This API is ICU internal only.
-
-