LEFT | RIGHT |
(no file at all) | |
1 // © 2016 and later: Unicode, Inc. and others. | 1 // © 2016 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 /* | 3 /* |
4 ******************************************************************************* | 4 ******************************************************************************* |
5 * Copyright (C) 2014, International Business Machines Corporation and * | 5 * Copyright (C) 2014, International Business Machines Corporation and * |
6 * others. All Rights Reserved. * | 6 * others. All Rights Reserved. * |
7 ******************************************************************************* | 7 ******************************************************************************* |
8 */ | 8 */ |
9 package com.ibm.icu.text; | 9 package com.ibm.icu.text; |
10 | 10 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 * @internal | 90 * @internal |
91 */ | 91 */ |
92 static class DequeI implements Cloneable { | 92 static class DequeI implements Cloneable { |
93 private int[] data = new int[50]; | 93 private int[] data = new int[50]; |
94 private int lastIdx = 4; // or base of stack. Index of element. | 94 private int lastIdx = 4; // or base of stack. Index of element. |
95 private int firstIdx = 4; // or Top of Stack. Index of element + 1. | 95 private int firstIdx = 4; // or Top of Stack. Index of element + 1. |
96 | 96 |
97 @Override | 97 @Override |
98 public Object clone() throws CloneNotSupportedException { | 98 public Object clone() throws CloneNotSupportedException { |
99 DequeI result = (DequeI)super.clone(); | 99 DequeI result = (DequeI)super.clone(); |
100 data = data.clone(); | 100 result.data = data.clone(); |
101 return result; | 101 return result; |
102 } | 102 } |
103 | 103 |
104 int size() { | 104 int size() { |
105 return firstIdx - lastIdx; | 105 return firstIdx - lastIdx; |
106 } | 106 } |
107 | 107 |
108 boolean isEmpty() { | 108 boolean isEmpty() { |
109 return size() == 0; | 109 return size() == 0; |
110 } | 110 } |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 * @param rangeEnd The end of the range of dictionary characters | 229 * @param rangeEnd The end of the range of dictionary characters |
230 * @param foundBreaks Output of break positions. Positions are pushed. | 230 * @param foundBreaks Output of break positions. Positions are pushed. |
231 * Pre-existing contents of the output stack are unaltere
d. | 231 * Pre-existing contents of the output stack are unaltere
d. |
232 * @return The number of breaks found | 232 * @return The number of breaks found |
233 */ | 233 */ |
234 abstract int divideUpDictionaryRange(CharacterIterator text, | 234 abstract int divideUpDictionaryRange(CharacterIterator text, |
235 int rangeStart, | 235 int rangeStart, |
236 int rangeEnd, | 236 int rangeEnd, |
237 DequeI foundBreaks ); | 237 DequeI foundBreaks ); |
238 } | 238 } |
LEFT | RIGHT |