OLD | NEW |
1 // © 2018 and later: Unicode, Inc. and others. | 1 // © 2018 and later: Unicode, Inc. and others. |
2 // License & terms of use: http://www.unicode.org/copyright.html#License | 2 // License & terms of use: http://www.unicode.org/copyright.html#License |
3 package com.ibm.icu.impl.number.parse; | 3 package com.ibm.icu.impl.number.parse; |
4 | 4 |
5 import com.ibm.icu.text.DecimalFormatSymbols; | 5 import com.ibm.icu.text.DecimalFormatSymbols; |
6 import com.ibm.icu.util.Currency; | 6 import com.ibm.icu.util.Currency; |
7 import com.ibm.icu.util.ULocale; | 7 import com.ibm.icu.util.ULocale; |
8 | 8 |
9 /** | 9 /** |
10 * Small helper class that generates matchers for individual tokens for AffixPat
ternMatcher. | 10 * Small helper class that generates matchers for individual tokens for AffixPat
ternMatcher. |
11 * | 11 * |
12 * @author sffc | 12 * @author sffc |
13 */ | 13 */ |
14 public class AffixTokenMatcherFactory { | 14 public class AffixTokenMatcherFactory { |
15 public Currency currency; | 15 public Currency currency; |
16 public DecimalFormatSymbols symbols; | 16 public DecimalFormatSymbols symbols; |
17 public IgnorablesMatcher ignorables; | 17 public IgnorablesMatcher ignorables; |
18 public ULocale locale; | 18 public ULocale locale; |
| 19 public int parseFlags; |
19 | 20 |
20 public MinusSignMatcher minusSign() { | 21 public MinusSignMatcher minusSign() { |
21 return MinusSignMatcher.getInstance(symbols, true); | 22 return MinusSignMatcher.getInstance(symbols, true); |
22 } | 23 } |
23 | 24 |
24 public PlusSignMatcher plusSign() { | 25 public PlusSignMatcher plusSign() { |
25 return PlusSignMatcher.getInstance(symbols, true); | 26 return PlusSignMatcher.getInstance(symbols, true); |
26 } | 27 } |
27 | 28 |
28 public PercentMatcher percent() { | 29 public PercentMatcher percent() { |
29 return PercentMatcher.getInstance(symbols); | 30 return PercentMatcher.getInstance(symbols); |
30 } | 31 } |
31 | 32 |
32 public PermilleMatcher permille() { | 33 public PermilleMatcher permille() { |
33 return PermilleMatcher.getInstance(symbols); | 34 return PermilleMatcher.getInstance(symbols); |
34 } | 35 } |
35 | 36 |
36 public CombinedCurrencyMatcher currency() { | 37 public CombinedCurrencyMatcher currency() { |
37 return CombinedCurrencyMatcher.getInstance(currency, symbols); | 38 return CombinedCurrencyMatcher.getInstance(currency, symbols, parseFlags
); |
38 } | 39 } |
39 | 40 |
40 public IgnorablesMatcher ignorables() { | 41 public IgnorablesMatcher ignorables() { |
41 return ignorables; | 42 return ignorables; |
42 } | 43 } |
43 } | 44 } |
OLD | NEW |