22 * or visit www.oracle.com if you need additional information or have any |
22 * or visit www.oracle.com if you need additional information or have any |
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 package com.sun.tools.javac.util; |
26 package com.sun.tools.javac.util; |
|
27 |
|
28 import java.util.Arrays; |
27 |
29 |
28 /** A class for extensible, mutable bit sets. |
30 /** A class for extensible, mutable bit sets. |
29 * |
31 * |
30 * <p><b>This is NOT part of any supported API. |
32 * <p><b>This is NOT part of any supported API. |
31 * If you write code that depends on this, you do so at your own risk. |
33 * If you write code that depends on this, you do so at your own risk. |
60 inclRange(start, limit); |
62 inclRange(start, limit); |
61 } |
63 } |
62 |
64 |
63 private void sizeTo(int len) { |
65 private void sizeTo(int len) { |
64 if (bits.length < len) { |
66 if (bits.length < len) { |
65 int[] newbits = new int[len]; |
67 bits = Arrays.copyOf(bits, len); |
66 System.arraycopy(bits, 0, newbits, 0, bits.length); |
|
67 bits = newbits; |
|
68 } |
68 } |
69 } |
69 } |
70 |
70 |
71 /** This set = {}. |
71 /** This set = {}. |
72 */ |
72 */ |