4423 |
|
public abstract boolean contains(Object o); |
4424 |
|
public abstract boolean remove(Object o); |
4425 |
|
|
4426 |
< |
private static final String oomeMsg = "Required array size too large"; |
4426 |
> |
private static final String OOME_MSG = "Required array size too large"; |
4427 |
|
|
4428 |
|
public final Object[] toArray() { |
4429 |
|
long sz = map.mappingCount(); |
4430 |
|
if (sz > MAX_ARRAY_SIZE) |
4431 |
< |
throw new OutOfMemoryError(oomeMsg); |
4431 |
> |
throw new OutOfMemoryError(OOME_MSG); |
4432 |
|
int n = (int)sz; |
4433 |
|
Object[] r = new Object[n]; |
4434 |
|
int i = 0; |
4435 |
|
for (E e : this) { |
4436 |
|
if (i == n) { |
4437 |
|
if (n >= MAX_ARRAY_SIZE) |
4438 |
< |
throw new OutOfMemoryError(oomeMsg); |
4438 |
> |
throw new OutOfMemoryError(OOME_MSG); |
4439 |
|
if (n >= MAX_ARRAY_SIZE - (MAX_ARRAY_SIZE >>> 1) - 1) |
4440 |
|
n = MAX_ARRAY_SIZE; |
4441 |
|
else |
4451 |
|
public final <T> T[] toArray(T[] a) { |
4452 |
|
long sz = map.mappingCount(); |
4453 |
|
if (sz > MAX_ARRAY_SIZE) |
4454 |
< |
throw new OutOfMemoryError(oomeMsg); |
4454 |
> |
throw new OutOfMemoryError(OOME_MSG); |
4455 |
|
int m = (int)sz; |
4456 |
|
T[] r = (a.length >= m) ? a : |
4457 |
|
(T[])java.lang.reflect.Array |
4461 |
|
for (E e : this) { |
4462 |
|
if (i == n) { |
4463 |
|
if (n >= MAX_ARRAY_SIZE) |
4464 |
< |
throw new OutOfMemoryError(oomeMsg); |
4464 |
> |
throw new OutOfMemoryError(OOME_MSG); |
4465 |
|
if (n >= MAX_ARRAY_SIZE - (MAX_ARRAY_SIZE >>> 1) - 1) |
4466 |
|
n = MAX_ARRAY_SIZE; |
4467 |
|
else |