256 * <td valign="top"></td>
257 * <td valign="top">either <code>a</code> or <code>b</code><br>
258 * </td>
259 * </tr>
260 * <tr>
261 * <td nowrap valign="top"><code>'a'</code></td>
262 * <td valign="top"></td>
263 * <td valign="top">the literal string between the quotes </td>
264 * </tr>
265 * </table>
266 * </td>
267 * </tr>
268 * </table>
269 * </blockquote>
270 * <p>To iterate over contents of UnicodeSet, use UnicodeSetIterator class.
271 *
272 * @author Alan Liu
273 * @stable ICU 2.0
274 * @see UnicodeSetIterator
275 */
276 public class UnicodeSet implements UnicodeMatcher {
277
278 private static final int LOW = 0x000000; // LOW <= all valid values. ZERO for codepoints
279 private static final int HIGH = 0x110000; // HIGH > all valid values. 10000 for code units.
280 // 110000 for codepoints
281
282 /**
283 * Minimum value that can be stored in a UnicodeSet.
284 * @stable ICU 2.0
285 */
286 public static final int MIN_VALUE = LOW;
287
288 /**
289 * Maximum value that can be stored in a UnicodeSet.
290 * @stable ICU 2.0
291 */
292 public static final int MAX_VALUE = HIGH - 1;
293
294 private int len; // length used; list may be longer to minimize reallocs
295 private int[] list; // MUST be terminated with HIGH
|
256 * <td valign="top"></td>
257 * <td valign="top">either <code>a</code> or <code>b</code><br>
258 * </td>
259 * </tr>
260 * <tr>
261 * <td nowrap valign="top"><code>'a'</code></td>
262 * <td valign="top"></td>
263 * <td valign="top">the literal string between the quotes </td>
264 * </tr>
265 * </table>
266 * </td>
267 * </tr>
268 * </table>
269 * </blockquote>
270 * <p>To iterate over contents of UnicodeSet, use UnicodeSetIterator class.
271 *
272 * @author Alan Liu
273 * @stable ICU 2.0
274 * @see UnicodeSetIterator
275 */
276 @SuppressWarnings("deprecation")
277 public class UnicodeSet implements UnicodeMatcher {
278
279 private static final int LOW = 0x000000; // LOW <= all valid values. ZERO for codepoints
280 private static final int HIGH = 0x110000; // HIGH > all valid values. 10000 for code units.
281 // 110000 for codepoints
282
283 /**
284 * Minimum value that can be stored in a UnicodeSet.
285 * @stable ICU 2.0
286 */
287 public static final int MIN_VALUE = LOW;
288
289 /**
290 * Maximum value that can be stored in a UnicodeSet.
291 * @stable ICU 2.0
292 */
293 public static final int MAX_VALUE = HIGH - 1;
294
295 private int len; // length used; list may be longer to minimize reallocs
296 private int[] list; // MUST be terminated with HIGH
|