src/share/classes/com/sun/tools/javac/util/List.java

Sat, 07 Nov 2020 10:30:02 +0800

author
aoqi
date
Sat, 07 Nov 2020 10:30:02 +0800
changeset 3938
93012e2a5d1d
parent 2525
2eb010b6cb22
permissions
-rw-r--r--

Added tag mips-jdk8u275-b01 for changeset eb6ee6a5f2fe

aoqi@0 1 /*
aoqi@0 2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
aoqi@0 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 4 *
aoqi@0 5 * This code is free software; you can redistribute it and/or modify it
aoqi@0 6 * under the terms of the GNU General Public License version 2 only, as
aoqi@0 7 * published by the Free Software Foundation. Oracle designates this
aoqi@0 8 * particular file as subject to the "Classpath" exception as provided
aoqi@0 9 * by Oracle in the LICENSE file that accompanied this code.
aoqi@0 10 *
aoqi@0 11 * This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 14 * version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 15 * accompanied this code).
aoqi@0 16 *
aoqi@0 17 * You should have received a copy of the GNU General Public License version
aoqi@0 18 * 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 20 *
aoqi@0 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 22 * or visit www.oracle.com if you need additional information or have any
aoqi@0 23 * questions.
aoqi@0 24 */
aoqi@0 25
aoqi@0 26 package com.sun.tools.javac.util;
aoqi@0 27
aoqi@0 28 import java.lang.reflect.Array;
aoqi@0 29 import java.util.ArrayList;
aoqi@0 30 import java.util.Collection;
aoqi@0 31 import java.util.Collections;
aoqi@0 32 import java.util.Iterator;
aoqi@0 33 import java.util.AbstractCollection;
aoqi@0 34 import java.util.ListIterator;
aoqi@0 35 import java.util.NoSuchElementException;
aoqi@0 36
aoqi@0 37 /** A class for generic linked lists. Links are supposed to be
aoqi@0 38 * immutable, the only exception being the incremental construction of
aoqi@0 39 * lists via ListBuffers. List is the main container class in
aoqi@0 40 * GJC. Most data structures and algorithms in GJC use lists rather
aoqi@0 41 * than arrays.
aoqi@0 42 *
aoqi@0 43 * <p>Lists are always trailed by a sentinel element, whose head and tail
aoqi@0 44 * are both null.
aoqi@0 45 *
aoqi@0 46 * <p><b>This is NOT part of any supported API.
aoqi@0 47 * If you write code that depends on this, you do so at your own risk.
aoqi@0 48 * This code and its internal interfaces are subject to change or
aoqi@0 49 * deletion without notice.</b>
aoqi@0 50 */
aoqi@0 51 public class List<A> extends AbstractCollection<A> implements java.util.List<A> {
aoqi@0 52
aoqi@0 53 /** The first element of the list, supposed to be immutable.
aoqi@0 54 */
aoqi@0 55 public A head;
aoqi@0 56
aoqi@0 57 /** The remainder of the list except for its first element, supposed
aoqi@0 58 * to be immutable.
aoqi@0 59 */
aoqi@0 60 //@Deprecated
aoqi@0 61 public List<A> tail;
aoqi@0 62
aoqi@0 63 /** Construct a list given its head and tail.
aoqi@0 64 */
aoqi@0 65 List(A head, List<A> tail) {
aoqi@0 66 this.tail = tail;
aoqi@0 67 this.head = head;
aoqi@0 68 }
aoqi@0 69
aoqi@0 70 /** Construct an empty list.
aoqi@0 71 */
aoqi@0 72 @SuppressWarnings("unchecked")
aoqi@0 73 public static <A> List<A> nil() {
aoqi@0 74 return (List<A>)EMPTY_LIST;
aoqi@0 75 }
aoqi@0 76
aoqi@0 77 private static final List<?> EMPTY_LIST = new List<Object>(null,null) {
aoqi@0 78 public List<Object> setTail(List<Object> tail) {
aoqi@0 79 throw new UnsupportedOperationException();
aoqi@0 80 }
aoqi@0 81 public boolean isEmpty() {
aoqi@0 82 return true;
aoqi@0 83 }
aoqi@0 84 };
aoqi@0 85
aoqi@0 86 /** Returns the list obtained from 'l' after removing all elements 'elem'
aoqi@0 87 */
aoqi@0 88 public static <A> List<A> filter(List<A> l, A elem) {
aoqi@0 89 Assert.checkNonNull(elem);
aoqi@0 90 List<A> res = List.nil();
aoqi@0 91 for (A a : l) {
aoqi@0 92 if (a != null && !a.equals(elem)) {
aoqi@0 93 res = res.prepend(a);
aoqi@0 94 }
aoqi@0 95 }
aoqi@0 96 return res.reverse();
aoqi@0 97 }
aoqi@0 98
aoqi@0 99 public List<A> intersect(List<A> that) {
aoqi@0 100 ListBuffer<A> buf = new ListBuffer<>();
aoqi@0 101 for (A el : this) {
aoqi@0 102 if (that.contains(el)) {
aoqi@0 103 buf.append(el);
aoqi@0 104 }
aoqi@0 105 }
aoqi@0 106 return buf.toList();
aoqi@0 107 }
aoqi@0 108
aoqi@0 109 public List<A> diff(List<A> that) {
aoqi@0 110 ListBuffer<A> buf = new ListBuffer<>();
aoqi@0 111 for (A el : this) {
aoqi@0 112 if (!that.contains(el)) {
aoqi@0 113 buf.append(el);
aoqi@0 114 }
aoqi@0 115 }
aoqi@0 116 return buf.toList();
aoqi@0 117 }
aoqi@0 118
aoqi@0 119 /**
aoqi@0 120 * Create a new list from the first {@code n} elements of this list
aoqi@0 121 */
aoqi@0 122 public List<A> take(int n) {
aoqi@0 123 ListBuffer<A> buf = new ListBuffer<>();
aoqi@0 124 int count = 0;
aoqi@0 125 for (A el : this) {
aoqi@0 126 if (count++ == n) break;
aoqi@0 127 buf.append(el);
aoqi@0 128 }
aoqi@0 129 return buf.toList();
aoqi@0 130 }
aoqi@0 131
aoqi@0 132 /** Construct a list consisting of given element.
aoqi@0 133 */
aoqi@0 134 public static <A> List<A> of(A x1) {
aoqi@0 135 return new List<A>(x1, List.<A>nil());
aoqi@0 136 }
aoqi@0 137
aoqi@0 138 /** Construct a list consisting of given elements.
aoqi@0 139 */
aoqi@0 140 public static <A> List<A> of(A x1, A x2) {
aoqi@0 141 return new List<A>(x1, of(x2));
aoqi@0 142 }
aoqi@0 143
aoqi@0 144 /** Construct a list consisting of given elements.
aoqi@0 145 */
aoqi@0 146 public static <A> List<A> of(A x1, A x2, A x3) {
aoqi@0 147 return new List<A>(x1, of(x2, x3));
aoqi@0 148 }
aoqi@0 149
aoqi@0 150 /** Construct a list consisting of given elements.
aoqi@0 151 */
aoqi@0 152 @SuppressWarnings({"varargs", "unchecked"})
aoqi@0 153 public static <A> List<A> of(A x1, A x2, A x3, A... rest) {
aoqi@0 154 return new List<A>(x1, new List<A>(x2, new List<A>(x3, from(rest))));
aoqi@0 155 }
aoqi@0 156
aoqi@0 157 /**
aoqi@0 158 * Construct a list consisting all elements of given array.
aoqi@0 159 * @param array an array; if {@code null} return an empty list
aoqi@0 160 */
aoqi@0 161 public static <A> List<A> from(A[] array) {
aoqi@0 162 List<A> xs = nil();
aoqi@0 163 if (array != null)
aoqi@0 164 for (int i = array.length - 1; i >= 0; i--)
aoqi@0 165 xs = new List<A>(array[i], xs);
aoqi@0 166 return xs;
aoqi@0 167 }
aoqi@0 168
aoqi@0 169 public static <A> List<A> from(Iterable<? extends A> coll) {
aoqi@0 170 ListBuffer<A> xs = new ListBuffer<>();
aoqi@0 171 for (A a : coll) {
aoqi@0 172 xs.append(a);
aoqi@0 173 }
aoqi@0 174 return xs.toList();
aoqi@0 175 }
aoqi@0 176
aoqi@0 177 /** Construct a list consisting of a given number of identical elements.
aoqi@0 178 * @param len The number of elements in the list.
aoqi@0 179 * @param init The value of each element.
aoqi@0 180 */
aoqi@0 181 @Deprecated
aoqi@0 182 public static <A> List<A> fill(int len, A init) {
aoqi@0 183 List<A> l = nil();
aoqi@0 184 for (int i = 0; i < len; i++) l = new List<A>(init, l);
aoqi@0 185 return l;
aoqi@0 186 }
aoqi@0 187
aoqi@0 188 /** Does list have no elements?
aoqi@0 189 */
aoqi@0 190 @Override
aoqi@0 191 public boolean isEmpty() {
aoqi@0 192 return tail == null;
aoqi@0 193 }
aoqi@0 194
aoqi@0 195 /** Does list have elements?
aoqi@0 196 */
aoqi@0 197 //@Deprecated
aoqi@0 198 public boolean nonEmpty() {
aoqi@0 199 return tail != null;
aoqi@0 200 }
aoqi@0 201
aoqi@0 202 /** Return the number of elements in this list.
aoqi@0 203 */
aoqi@0 204 //@Deprecated
aoqi@0 205 public int length() {
aoqi@0 206 List<A> l = this;
aoqi@0 207 int len = 0;
aoqi@0 208 while (l.tail != null) {
aoqi@0 209 l = l.tail;
aoqi@0 210 len++;
aoqi@0 211 }
aoqi@0 212 return len;
aoqi@0 213 }
aoqi@0 214 @Override
aoqi@0 215 public int size() {
aoqi@0 216 return length();
aoqi@0 217 }
aoqi@0 218
aoqi@0 219 public List<A> setTail(List<A> tail) {
aoqi@0 220 this.tail = tail;
aoqi@0 221 return tail;
aoqi@0 222 }
aoqi@0 223
aoqi@0 224 /** Prepend given element to front of list, forming and returning
aoqi@0 225 * a new list.
aoqi@0 226 */
aoqi@0 227 public List<A> prepend(A x) {
aoqi@0 228 return new List<A>(x, this);
aoqi@0 229 }
aoqi@0 230
aoqi@0 231 /** Prepend given list of elements to front of list, forming and returning
aoqi@0 232 * a new list.
aoqi@0 233 */
aoqi@0 234 public List<A> prependList(List<A> xs) {
aoqi@0 235 if (this.isEmpty()) return xs;
aoqi@0 236 if (xs.isEmpty()) return this;
aoqi@0 237 if (xs.tail.isEmpty()) return prepend(xs.head);
aoqi@0 238 // return this.prependList(xs.tail).prepend(xs.head);
aoqi@0 239 List<A> result = this;
aoqi@0 240 List<A> rev = xs.reverse();
aoqi@0 241 Assert.check(rev != xs);
aoqi@0 242 // since xs.reverse() returned a new list, we can reuse the
aoqi@0 243 // individual List objects, instead of allocating new ones.
aoqi@0 244 while (rev.nonEmpty()) {
aoqi@0 245 List<A> h = rev;
aoqi@0 246 rev = rev.tail;
aoqi@0 247 h.setTail(result);
aoqi@0 248 result = h;
aoqi@0 249 }
aoqi@0 250 return result;
aoqi@0 251 }
aoqi@0 252
aoqi@0 253 /** Reverse list.
aoqi@0 254 * If the list is empty or a singleton, then the same list is returned.
aoqi@0 255 * Otherwise a new list is formed.
aoqi@0 256 */
aoqi@0 257 public List<A> reverse() {
aoqi@0 258 // if it is empty or a singleton, return itself
aoqi@0 259 if (isEmpty() || tail.isEmpty())
aoqi@0 260 return this;
aoqi@0 261
aoqi@0 262 List<A> rev = nil();
aoqi@0 263 for (List<A> l = this; l.nonEmpty(); l = l.tail)
aoqi@0 264 rev = new List<A>(l.head, rev);
aoqi@0 265 return rev;
aoqi@0 266 }
aoqi@0 267
aoqi@0 268 /** Append given element at length, forming and returning
aoqi@0 269 * a new list.
aoqi@0 270 */
aoqi@0 271 public List<A> append(A x) {
aoqi@0 272 return of(x).prependList(this);
aoqi@0 273 }
aoqi@0 274
aoqi@0 275 /** Append given list at length, forming and returning
aoqi@0 276 * a new list.
aoqi@0 277 */
aoqi@0 278 public List<A> appendList(List<A> x) {
aoqi@0 279 return x.prependList(this);
aoqi@0 280 }
aoqi@0 281
aoqi@0 282 /**
aoqi@0 283 * Append given list buffer at length, forming and returning a new
aoqi@0 284 * list.
aoqi@0 285 */
aoqi@0 286 public List<A> appendList(ListBuffer<A> x) {
aoqi@0 287 return appendList(x.toList());
aoqi@0 288 }
aoqi@0 289
aoqi@0 290 /** Copy successive elements of this list into given vector until
aoqi@0 291 * list is exhausted or end of vector is reached.
aoqi@0 292 */
aoqi@0 293 @Override @SuppressWarnings("unchecked")
aoqi@0 294 public <T> T[] toArray(T[] vec) {
aoqi@0 295 int i = 0;
aoqi@0 296 List<A> l = this;
aoqi@0 297 Object[] dest = vec;
aoqi@0 298 while (l.nonEmpty() && i < vec.length) {
aoqi@0 299 dest[i] = l.head;
aoqi@0 300 l = l.tail;
aoqi@0 301 i++;
aoqi@0 302 }
aoqi@0 303 if (l.isEmpty()) {
aoqi@0 304 if (i < vec.length)
aoqi@0 305 vec[i] = null;
aoqi@0 306 return vec;
aoqi@0 307 }
aoqi@0 308
aoqi@0 309 vec = (T[])Array.newInstance(vec.getClass().getComponentType(), size());
aoqi@0 310 return toArray(vec);
aoqi@0 311 }
aoqi@0 312
aoqi@0 313 public Object[] toArray() {
aoqi@0 314 return toArray(new Object[size()]);
aoqi@0 315 }
aoqi@0 316
aoqi@0 317 /** Form a string listing all elements with given separator character.
aoqi@0 318 */
aoqi@0 319 public String toString(String sep) {
aoqi@0 320 if (isEmpty()) {
aoqi@0 321 return "";
aoqi@0 322 } else {
aoqi@0 323 StringBuilder buf = new StringBuilder();
aoqi@0 324 buf.append(head);
aoqi@0 325 for (List<A> l = tail; l.nonEmpty(); l = l.tail) {
aoqi@0 326 buf.append(sep);
aoqi@0 327 buf.append(l.head);
aoqi@0 328 }
aoqi@0 329 return buf.toString();
aoqi@0 330 }
aoqi@0 331 }
aoqi@0 332
aoqi@0 333 /** Form a string listing all elements with comma as the separator character.
aoqi@0 334 */
aoqi@0 335 @Override
aoqi@0 336 public String toString() {
aoqi@0 337 return toString(",");
aoqi@0 338 }
aoqi@0 339
aoqi@0 340 /** Compute a hash code, overrides Object
aoqi@0 341 * @see java.util.List#hashCode
aoqi@0 342 */
aoqi@0 343 @Override
aoqi@0 344 public int hashCode() {
aoqi@0 345 List<A> l = this;
aoqi@0 346 int h = 1;
aoqi@0 347 while (l.tail != null) {
aoqi@0 348 h = h * 31 + (l.head == null ? 0 : l.head.hashCode());
aoqi@0 349 l = l.tail;
aoqi@0 350 }
aoqi@0 351 return h;
aoqi@0 352 }
aoqi@0 353
aoqi@0 354 /** Is this list the same as other list?
aoqi@0 355 * @see java.util.List#equals
aoqi@0 356 */
aoqi@0 357 @Override
aoqi@0 358 public boolean equals(Object other) {
aoqi@0 359 if (other instanceof List<?>)
aoqi@0 360 return equals(this, (List<?>)other);
aoqi@0 361 if (other instanceof java.util.List<?>) {
aoqi@0 362 List<A> t = this;
aoqi@0 363 Iterator<?> oIter = ((java.util.List<?>) other).iterator();
aoqi@0 364 while (t.tail != null && oIter.hasNext()) {
aoqi@0 365 Object o = oIter.next();
aoqi@0 366 if ( !(t.head == null ? o == null : t.head.equals(o)))
aoqi@0 367 return false;
aoqi@0 368 t = t.tail;
aoqi@0 369 }
aoqi@0 370 return (t.isEmpty() && !oIter.hasNext());
aoqi@0 371 }
aoqi@0 372 return false;
aoqi@0 373 }
aoqi@0 374
aoqi@0 375 /** Are the two lists the same?
aoqi@0 376 */
aoqi@0 377 public static boolean equals(List<?> xs, List<?> ys) {
aoqi@0 378 while (xs.tail != null && ys.tail != null) {
aoqi@0 379 if (xs.head == null) {
aoqi@0 380 if (ys.head != null) return false;
aoqi@0 381 } else {
aoqi@0 382 if (!xs.head.equals(ys.head)) return false;
aoqi@0 383 }
aoqi@0 384 xs = xs.tail;
aoqi@0 385 ys = ys.tail;
aoqi@0 386 }
aoqi@0 387 return xs.tail == null && ys.tail == null;
aoqi@0 388 }
aoqi@0 389
aoqi@0 390 /** Does the list contain the specified element?
aoqi@0 391 */
aoqi@0 392 @Override
aoqi@0 393 public boolean contains(Object x) {
aoqi@0 394 List<A> l = this;
aoqi@0 395 while (l.tail != null) {
aoqi@0 396 if (x == null) {
aoqi@0 397 if (l.head == null) return true;
aoqi@0 398 } else {
aoqi@0 399 if (l.head.equals(x)) return true;
aoqi@0 400 }
aoqi@0 401 l = l.tail;
aoqi@0 402 }
aoqi@0 403 return false;
aoqi@0 404 }
aoqi@0 405
aoqi@0 406 /** The last element in the list, if any, or null.
aoqi@0 407 */
aoqi@0 408 public A last() {
aoqi@0 409 A last = null;
aoqi@0 410 List<A> t = this;
aoqi@0 411 while (t.tail != null) {
aoqi@0 412 last = t.head;
aoqi@0 413 t = t.tail;
aoqi@0 414 }
aoqi@0 415 return last;
aoqi@0 416 }
aoqi@0 417
aoqi@0 418 @SuppressWarnings("unchecked")
aoqi@0 419 public static <T> List<T> convert(Class<T> klass, List<?> list) {
aoqi@0 420 if (list == null)
aoqi@0 421 return null;
aoqi@0 422 for (Object o : list)
aoqi@0 423 klass.cast(o);
aoqi@0 424 return (List<T>)list;
aoqi@0 425 }
aoqi@0 426
aoqi@0 427 private static final Iterator<?> EMPTYITERATOR = new Iterator<Object>() {
aoqi@0 428 public boolean hasNext() {
aoqi@0 429 return false;
aoqi@0 430 }
aoqi@0 431 public Object next() {
aoqi@0 432 throw new java.util.NoSuchElementException();
aoqi@0 433 }
aoqi@0 434 public void remove() {
aoqi@0 435 throw new UnsupportedOperationException();
aoqi@0 436 }
aoqi@0 437 };
aoqi@0 438
aoqi@0 439 @SuppressWarnings("unchecked")
aoqi@0 440 private static <A> Iterator<A> emptyIterator() {
aoqi@0 441 return (Iterator<A>)EMPTYITERATOR;
aoqi@0 442 }
aoqi@0 443
aoqi@0 444 @Override
aoqi@0 445 public Iterator<A> iterator() {
aoqi@0 446 if (tail == null)
aoqi@0 447 return emptyIterator();
aoqi@0 448 return new Iterator<A>() {
aoqi@0 449 List<A> elems = List.this;
aoqi@0 450 public boolean hasNext() {
aoqi@0 451 return elems.tail != null;
aoqi@0 452 }
aoqi@0 453 public A next() {
aoqi@0 454 if (elems.tail == null)
aoqi@0 455 throw new NoSuchElementException();
aoqi@0 456 A result = elems.head;
aoqi@0 457 elems = elems.tail;
aoqi@0 458 return result;
aoqi@0 459 }
aoqi@0 460 public void remove() {
aoqi@0 461 throw new UnsupportedOperationException();
aoqi@0 462 }
aoqi@0 463 };
aoqi@0 464 }
aoqi@0 465
aoqi@0 466 public A get(int index) {
aoqi@0 467 if (index < 0)
aoqi@0 468 throw new IndexOutOfBoundsException(String.valueOf(index));
aoqi@0 469
aoqi@0 470 List<A> l = this;
aoqi@0 471 for (int i = index; i-- > 0 && !l.isEmpty(); l = l.tail)
aoqi@0 472 ;
aoqi@0 473
aoqi@0 474 if (l.isEmpty())
aoqi@0 475 throw new IndexOutOfBoundsException("Index: " + index + ", " +
aoqi@0 476 "Size: " + size());
aoqi@0 477 return l.head;
aoqi@0 478 }
aoqi@0 479
aoqi@0 480 public boolean addAll(int index, Collection<? extends A> c) {
aoqi@0 481 if (c.isEmpty())
aoqi@0 482 return false;
aoqi@0 483 throw new UnsupportedOperationException();
aoqi@0 484 }
aoqi@0 485
aoqi@0 486 public A set(int index, A element) {
aoqi@0 487 throw new UnsupportedOperationException();
aoqi@0 488 }
aoqi@0 489
aoqi@0 490 public void add(int index, A element) {
aoqi@0 491 throw new UnsupportedOperationException();
aoqi@0 492 }
aoqi@0 493
aoqi@0 494 public A remove(int index) {
aoqi@0 495 throw new UnsupportedOperationException();
aoqi@0 496 }
aoqi@0 497
aoqi@0 498 public int indexOf(Object o) {
aoqi@0 499 int i = 0;
aoqi@0 500 for (List<A> l = this; l.tail != null; l = l.tail, i++) {
aoqi@0 501 if (l.head == null ? o == null : l.head.equals(o))
aoqi@0 502 return i;
aoqi@0 503 }
aoqi@0 504 return -1;
aoqi@0 505 }
aoqi@0 506
aoqi@0 507 public int lastIndexOf(Object o) {
aoqi@0 508 int last = -1;
aoqi@0 509 int i = 0;
aoqi@0 510 for (List<A> l = this; l.tail != null; l = l.tail, i++) {
aoqi@0 511 if (l.head == null ? o == null : l.head.equals(o))
aoqi@0 512 last = i;
aoqi@0 513 }
aoqi@0 514 return last;
aoqi@0 515 }
aoqi@0 516
aoqi@0 517 public ListIterator<A> listIterator() {
aoqi@0 518 return Collections.unmodifiableList(new ArrayList<A>(this)).listIterator();
aoqi@0 519 }
aoqi@0 520
aoqi@0 521 public ListIterator<A> listIterator(int index) {
aoqi@0 522 return Collections.unmodifiableList(new ArrayList<A>(this)).listIterator(index);
aoqi@0 523 }
aoqi@0 524
aoqi@0 525 public java.util.List<A> subList(int fromIndex, int toIndex) {
aoqi@0 526 if (fromIndex < 0 || toIndex > size() || fromIndex > toIndex)
aoqi@0 527 throw new IllegalArgumentException();
aoqi@0 528
aoqi@0 529 ArrayList<A> a = new ArrayList<A>(toIndex - fromIndex);
aoqi@0 530 int i = 0;
aoqi@0 531 for (List<A> l = this; l.tail != null; l = l.tail, i++) {
aoqi@0 532 if (i == toIndex)
aoqi@0 533 break;
aoqi@0 534 if (i >= fromIndex)
aoqi@0 535 a.add(l.head);
aoqi@0 536 }
aoqi@0 537
aoqi@0 538 return Collections.unmodifiableList(a);
aoqi@0 539 }
aoqi@0 540 }

mercurial