Home
last modified time | relevance | path

Searched refs:parsePosition (Results 1 – 25 of 73) sorted by relevance

123

/external/cldr/tools/java/org/unicode/cldr/draft/
DStateMachineBuilder.java28 private ParsePosition parsePosition = new ParsePosition(0); field in StateMachineBuilder
112 parsePosition.setIndex(0); in add()
117 String stateString = scanForVariable(rule, parsePosition); in add()
118 scanOver(rule, WHITESPACE, parsePosition); in add()
133 String variable = scanForVariable(rule, parsePosition); in add()
137 scanOver(rule, WHITESPACE, parsePosition); in add()
139 scanOver(rule, WHITESPACE, parsePosition); in add()
150 scanOver(rule, WHITESPACE, parsePosition); in add()
151 String item = scanForVariable(rule, parsePosition); in add()
154 scanOver(rule, WHITESPACE, parsePosition); in add()
[all …]
DStateMachineTest.java90 ParsePosition parsePosition = new ParsePosition(0); in main() local
115 parsePosition.setIndex(0); in main()
120 result = machine.parse(testLine, parsePosition); in main()
130 int j = parsePosition.getIndex(); in main()
132 … System.out.println("ERROR: " + testLine.substring(0, parsePosition.getErrorIndex()) in main()
133 + "$" + testLine.substring(parsePosition.getErrorIndex())); in main()
134 repeatCall(machine, parsePosition, testLine); in main()
139 repeatCall(machine, parsePosition, testLine); in main()
148 private static void repeatCall(UnicodeSetBuilder machine, ParsePosition parsePosition, in repeatCall() argument
156 machine.parse(testLine, parsePosition); in repeatCall()
DPatternFixer.java66 ParsePosition parsePosition = new ParsePosition(0); in fix() local
79 i = parseUnicodeSet(regexPattern, builder, parsePosition, result, i) - 1; in fix()
88 i = parseUnicodeSet(regexPattern, builder, parsePosition, result, i) - 1; in fix()
150 ParsePosition parsePosition, StringBuffer result, int i) throws ParseException { in parseUnicodeSet() argument
DStateMachine.java150 public T parse(CharSequence string, ParsePosition parsePosition) { in parse() argument
151 int i = parsePosition.getIndex(); in parse()
187 parsePosition.setIndex(i); in parse()
190 parsePosition.setErrorIndex(i); in parse()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DNFSubstitution.java427 public Number doParse(String text, ParsePosition parsePosition, double baseValue, in doParse() argument
446 … tempResult = ruleSet.parse(text, parsePosition, upperBound, nonNumericalExecutedRuleMask); in doParse()
447 if (lenientParse && !ruleSet.isFractionSet() && parsePosition.getIndex() == 0) { in doParse()
448 tempResult = ruleSet.owner.getDecimalFormat().parse(text, parsePosition); in doParse()
453 tempResult = numberFormat.parse(text, parsePosition); in doParse()
460 if (parsePosition.getIndex() != 0) { in doParse()
997 public Number doParse(String text, ParsePosition parsePosition, double baseValue, in doParse() argument
1002 …return super.doParse(text, parsePosition, baseValue, upperBound, lenientParse, nonNumericalExecute… in doParse()
1008 …Number tempResult = ruleToUse.doParse(text, parsePosition, false, upperBound, nonNumericalExecuted… in doParse()
1010 if (parsePosition.getIndex() != 0) { in doParse()
[all …]
DNFRuleSet.java754 …public Number parse(String text, ParsePosition parsePosition, double upperBound, int nonNumericalE… in parse() argument
775 …tempResult = nonNumericalRule.doParse(text, parsePosition, false, upperBound, nonNumericalExecuted… in parse()
776 if (parsePosition.getIndex() > highWaterMark.getIndex()) { in parse()
778 highWaterMark.setIndex(parsePosition.getIndex()); in parse()
784 parsePosition.setIndex(0); in parse()
802 …tempResult = rules[i].doParse(text, parsePosition, isFractionRuleSet, upperBound, nonNumericalExec… in parse()
803 if (parsePosition.getIndex() > highWaterMark.getIndex()) { in parse()
805 highWaterMark.setIndex(parsePosition.getIndex()); in parse()
811 parsePosition.setIndex(0); in parse()
817 parsePosition.setIndex(highWaterMark.getIndex()); in parse()
DDecimalFormat.java827 public Number parse(String text, ParsePosition parsePosition) { in parse() argument
831 if (parsePosition == null) { in parse()
832 parsePosition = new ParsePosition(0); in parse()
834 if (parsePosition.getIndex() < 0) { in parse()
837 if (parsePosition.getIndex() >= text.length()) { in parse()
845 int startIndex = parsePosition.getIndex(); in parse()
849 parsePosition.setIndex(result.charEnd); in parse()
858 parsePosition.setErrorIndex(startIndex + result.charEnd); in parse()
869 public CurrencyAmount parseCurrency(CharSequence text, ParsePosition parsePosition) { in parseCurrency() argument
873 if (parsePosition == null) { in parseCurrency()
[all …]
DCompactDecimalFormat.java134 public Number parse(String text, ParsePosition parsePosition) { in parse() argument
144 public CurrencyAmount parseCurrency(CharSequence text, ParsePosition parsePosition) { in parseCurrency() argument
/external/icu/android_icu4j/src/main/java/android/icu/text/
DNFSubstitution.java428 public Number doParse(String text, ParsePosition parsePosition, double baseValue, in doParse() argument
447 … tempResult = ruleSet.parse(text, parsePosition, upperBound, nonNumericalExecutedRuleMask); in doParse()
448 if (lenientParse && !ruleSet.isFractionSet() && parsePosition.getIndex() == 0) { in doParse()
449 tempResult = ruleSet.owner.getDecimalFormat().parse(text, parsePosition); in doParse()
454 tempResult = numberFormat.parse(text, parsePosition); in doParse()
461 if (parsePosition.getIndex() != 0) { in doParse()
998 public Number doParse(String text, ParsePosition parsePosition, double baseValue, in doParse() argument
1003 …return super.doParse(text, parsePosition, baseValue, upperBound, lenientParse, nonNumericalExecute… in doParse()
1009 …Number tempResult = ruleToUse.doParse(text, parsePosition, false, upperBound, nonNumericalExecuted… in doParse()
1011 if (parsePosition.getIndex() != 0) { in doParse()
[all …]
DNFRuleSet.java755 …public Number parse(String text, ParsePosition parsePosition, double upperBound, int nonNumericalE… in parse() argument
776 …tempResult = nonNumericalRule.doParse(text, parsePosition, false, upperBound, nonNumericalExecuted… in parse()
777 if (parsePosition.getIndex() > highWaterMark.getIndex()) { in parse()
779 highWaterMark.setIndex(parsePosition.getIndex()); in parse()
785 parsePosition.setIndex(0); in parse()
803 …tempResult = rules[i].doParse(text, parsePosition, isFractionRuleSet, upperBound, nonNumericalExec… in parse()
804 if (parsePosition.getIndex() > highWaterMark.getIndex()) { in parse()
806 highWaterMark.setIndex(parsePosition.getIndex()); in parse()
812 parsePosition.setIndex(0); in parse()
818 parsePosition.setIndex(highWaterMark.getIndex()); in parse()
DDecimalFormat.java798 public Number parse(String text, ParsePosition parsePosition) { in parse() argument
802 if (parsePosition == null) { in parse()
803 parsePosition = new ParsePosition(0); in parse()
805 if (parsePosition.getIndex() < 0) { in parse()
808 if (parsePosition.getIndex() >= text.length()) { in parse()
816 int startIndex = parsePosition.getIndex(); in parse()
820 parsePosition.setIndex(result.charEnd); in parse()
829 parsePosition.setErrorIndex(startIndex + result.charEnd); in parse()
838 public CurrencyAmount parseCurrency(CharSequence text, ParsePosition parsePosition) { in parseCurrency() argument
842 if (parsePosition == null) { in parseCurrency()
[all …]
DCompactDecimalFormat.java112 public Number parse(String text, ParsePosition parsePosition) { in parse() argument
120 public CurrencyAmount parseCurrency(CharSequence text, ParsePosition parsePosition) { in parseCurrency() argument
/external/icu/android_icu4j/testing/src/com/android/icu/test/text/
DCompatibleDecimalFormatFactoryTest.java56 ParsePosition parsePosition = new ParsePosition(0); in testCreate() local
58 decimalFormat.parse(" 1,234.56", parsePosition); in testCreate()
59 assertEquals(2, parsePosition.getIndex()); in testCreate()
61 parsePosition = new ParsePosition(0); in testCreate()
63 decimalFormat.parse("1,\u200e234.56", parsePosition); in testCreate()
64 assertEquals(1, parsePosition.getIndex()); in testCreate()
/external/icu/icu4c/source/i18n/
Dnfsubs.cpp157 ParsePosition& parsePosition,
224 ParsePosition& parsePosition,
296 ParsePosition& parsePosition,
694 ParsePosition& parsePosition, in doParse() argument
719 ruleSet->parse(text, parsePosition, upperBound, nonNumericalExecutedRuleMask, result); in doParse()
720 if (lenientParse && !ruleSet->isFractionRuleSet() && parsePosition.getIndex() == 0) { in doParse()
724 fmt->parse(text, result, parsePosition); in doParse()
731 numberFormat->parse(text, result, parsePosition); in doParse()
738 if (parsePosition.getIndex() != 0) { in doParse()
937 ParsePosition& parsePosition, in doParse() argument
[all …]
Dformat.cpp149 ParsePosition parsePosition(0); in parseObject() local
150 parseObject(source, result, parsePosition); in parseObject()
151 if (parsePosition.getIndex() == 0) { in parseObject()
Dnfrule.cpp900 ParsePosition& parsePosition, in doParse() argument
944 parsePosition.setErrorIndex(pp.getErrorIndex()); in doParse()
950 parsePosition.setIndex(pp.getIndex()); in doParse()
956 parsePosition.setIndex(pp.getIndex()); in doParse()
1043 if (i_temp> parsePosition.getErrorIndex()) { in doParse()
1044 parsePosition.setErrorIndex(i_temp); in doParse()
1052 if (i_temp > parsePosition.getErrorIndex()) { in doParse()
1053 parsePosition.setErrorIndex(i_temp); in doParse()
1068 parsePosition.setIndex(highWaterMark); in doParse()
1072 parsePosition.setErrorIndex(0); in doParse()
/external/cldr/tools/cldr-unittest/src/org/unicode/cldr/unittest/
DTestCollationStringByteConverter.java257 ParsePosition parsePosition = new ParsePosition(0); in check2() local
268 parsePosition.setIndex(0); in check2()
271 parser.parse(expected, calendar, parsePosition); in check2()
285 + show(expected, parsePosition)); in check2()
291 parsePosition.setIndex(0); in check2()
292 parser.parse(expected, calendar, parsePosition); in check2()
300 + show(expected, parsePosition) + "\t" + parser); in check2()
324 private static String show(String test, ParsePosition parsePosition) { in show() argument
326 + test.substring(0, parsePosition.getIndex()) in show()
328 + test.substring(parsePosition.getIndex()) in show()
[all …]
/external/icu/icu4j/demos/src/com/ibm/icu/dev/demo/rbnf/
DRbnfDemo.java94 parsePosition = new ParsePosition(0); in createDemoFrame()
112 parsePosition.setIndex(0); in createDemoFrame()
113 Number temp = numberFormatter.parse(fieldText, parsePosition); in createDemoFrame()
114 if (temp == null || parsePosition.getIndex() == 0) { in createDemoFrame()
145 parsePosition.setIndex(0); in createDemoFrame()
146 theNumber = new BigDecimal(spelloutFormatter.parse(fieldText, parsePosition) in createDemoFrame()
148 if (parsePosition.getIndex() == 0) { in createDemoFrame()
153 else if (parsePosition.getIndex() < fieldText.length()) { in createDemoFrame()
154 textField.select(parsePosition.getIndex(), fieldText.length()); in createDemoFrame()
170 parsePosition.setIndex(0); in createDemoFrame()
[all …]
/external/cldr/tools/java/org/unicode/cldr/util/
DTimezoneFormatter.java544 public String parse(String inputText, ParsePosition parsePosition) { in parse() argument
546 String result = parse(inputText, parsePosition, offsetMillisOutput); in parse()
566 public String parse(String inputText, ParsePosition parsePosition, long[] offsetMillis) { in parse() argument
569 int startOffset = parsePosition.getIndex(); in parse()
593 Object[] results = gmtFormat.parse(inputText, parsePosition); in parse()
597 results = gmtFormat.parse(inputText, parsePosition); in parse()
600 parsePosition.setIndex(0); in parse()
601 Date date = hourFormatPlus.parse(hours, parsePosition); in parse()
606 parsePosition.setIndex(0); in parse()
607 date = hourFormatMinus.parse(hours, parsePosition); // negative format in parse()
[all …]
/external/apache-commons-math/src/main/java/org/apache/commons/math/fraction/
DFractionFormat.java204 final ParsePosition parsePosition = new ParsePosition(0); in parse() local
205 final Fraction result = parse(source, parsePosition); in parse()
206 if (parsePosition.getIndex() == 0) { in parse()
208 parsePosition.getErrorIndex(), in parse()
DBigFractionFormat.java193 final ParsePosition parsePosition = new ParsePosition(0); in parse() local
194 final BigFraction result = parse(source, parsePosition); in parse()
195 if (parsePosition.getIndex() == 0) { in parse()
197 parsePosition.getErrorIndex(), in parse()
/external/apache-commons-math/src/main/java/org/apache/commons/math/linear/
DRealVectorFormat.java263 ParsePosition parsePosition = new ParsePosition(0); in parse() local
264 ArrayRealVector result = parse(source, parsePosition); in parse()
265 if (parsePosition.getIndex() == 0) { in parse()
267 parsePosition.getErrorIndex(), in parse()
/external/apache-commons-math/src/main/java/org/apache/commons/math/geometry/
DVector3DFormat.java258 ParsePosition parsePosition = new ParsePosition(0); in parse() local
259 Vector3D result = parse(source, parsePosition); in parse()
260 if (parsePosition.getIndex() == 0) { in parse()
262 parsePosition.getErrorIndex(), in parse()
/external/apache-commons-math/src/main/java/org/apache/commons/math/complex/
DComplexFormat.java255 ParsePosition parsePosition = new ParsePosition(0); in parse() local
256 Complex result = parse(source, parsePosition); in parse()
257 if (parsePosition.getIndex() == 0) { in parse()
259 parsePosition.getErrorIndex(), in parse()
/external/icu/android_icu4j/src/main/java/android/icu/impl/
DDateNumberFormat.java214 public Number parse(String text, ParsePosition parsePosition) { in parse() argument
218 int base = parsePosition.getIndex(); in parse()
251 parsePosition.setIndex(base + offset); in parse()

123