]> granicus.if.org Git - icu/commitdiff
ICU-13574 Fixing build errors after merge.
authorShane Carr <shane@unicode.org>
Wed, 28 Feb 2018 05:52:41 +0000 (05:52 +0000)
committerShane Carr <shane@unicode.org>
Wed, 28 Feb 2018 05:52:41 +0000 (05:52 +0000)
X-SVN-Rev: 41007

icu4j/main/classes/core/src/com/ibm/icu/impl/StringSegment.java
icu4j/main/classes/core/src/com/ibm/icu/impl/number/parse/CurrencyCustomMatcher.java
icu4j/main/classes/core/src/com/ibm/icu/impl/number/parse/CurrencyNamesMatcher.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/number/NumberParserTest.java

index 138abe82392986805d13f9d266050702cee5904c..5a1f6bd62c79b6e9539d0c22b33adcafcb9bc0f7 100644 (file)
@@ -106,6 +106,13 @@ public class StringSegment implements CharSequence {
         return lead;
     }
 
+    /**
+     * Returns the code point at the given index relative to the current offset.
+     */
+    public int codePointAt(int index) {
+        return str.codePointAt(start + index);
+    }
+
     /**
      * Returns true if the first code point of this StringSegment equals the given code point.
      *
index 3df201889b3d6e4f5adddedae94529eea09cbfe0..d008a0686cfcfc8bbb5658d94e7f56ea07f25426 100644 (file)
@@ -2,6 +2,7 @@
 // License & terms of use: http://www.unicode.org/copyright.html#License
 package com.ibm.icu.impl.number.parse;
 
+import com.ibm.icu.impl.StringSegment;
 import com.ibm.icu.text.UnicodeSet;
 import com.ibm.icu.util.Currency;
 import com.ibm.icu.util.ULocale;
index 9fdef2250456edb02d7ac0856470167c81e66c85..0fcadbb9cbcf5607d6b11896b3e0cabd41048a6b 100644 (file)
@@ -4,6 +4,7 @@ package com.ibm.icu.impl.number.parse;
 
 import java.util.Iterator;
 
+import com.ibm.icu.impl.StringSegment;
 import com.ibm.icu.impl.TextTrieMap;
 import com.ibm.icu.text.UnicodeSet;
 import com.ibm.icu.util.Currency;
index cd6915c2eb1f2b807714eb312e4982a9b915a686..a522a2899744135427b462905462f507de4534af 100644 (file)
@@ -249,7 +249,7 @@ public class NumberParserTest {
             String input = (String) cas[0];
             String expectedCurrencyCode = (String) cas[1];
 
-            StringSegment segment = new StringSegment(input, 0);
+            StringSegment segment = new StringSegment(input, true);
             ParsedNumber result = new ParsedNumber();
             matcher.match(segment, result);
             assertEquals("Parsing " + input, expectedCurrencyCode, result.currencyCode);
@@ -289,7 +289,7 @@ public class NumberParserTest {
             assertEquals(affixPattern + " " + exactMatch, expectedMatcherLength, matcher.length());
 
             // Check that the matcher works on a sample string
-            StringSegment segment = new StringSegment(sampleParseableString, 0);
+            StringSegment segment = new StringSegment(sampleParseableString, true);
             ParsedNumber result = new ParsedNumber();
             matcher.match(segment, result);
             assertEquals(affixPattern + " " + exactMatch,