com.ibm.icu.text
Class RbnfScannerProviderImpl

java.lang.Object
  extended by com.ibm.icu.text.RbnfScannerProviderImpl
All Implemented Interfaces:
RbnfLenientScannerProvider

Deprecated. This API is ICU internal only.

public class RbnfScannerProviderImpl
extends java.lang.Object
implements RbnfLenientScannerProvider

Returns RbnfLenientScanners that use the old RuleBasedNumberFormat implementation behind setLenientParseMode, which is based on Collator.

Status:
Internal. This API is ICU internal only.

Constructor Summary
RbnfScannerProviderImpl()
          Deprecated. This API is ICU internal only.
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RbnfScannerProviderImpl

public RbnfScannerProviderImpl()
Deprecated. This API is ICU internal only.

Status:
Internal. This API is ICU internal only.
Method Detail

get

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 interface RbnfLenientScannerProvider
Parameters:
locale - the locale to provide the default lenient rules.
extras - extra collation rules
Returns:
the lenient scanner, or null
Status:
Internal. This API is ICU internal only.

createScanner

protected RbnfLenientScanner createScanner(ULocale locale,
                                           java.lang.String extras)
Deprecated. This API is ICU internal only.

Status:
Internal. This API is ICU internal only.


Copyright (c) 2011 IBM Corporation and others.