3 * $Date: 2007-04-26 16:57:51 -0500 (Thu, 26 Apr 2007) $
6 * Copyright (C) 2005 The Jmol Development Team
8 * Contact: jmol-developers@lists.sf.net
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
27 import java.util.ArrayList;
30 * created to remove ambiguities in add and remove
34 public class Lst<V> extends ArrayList<V> {
46 public boolean add(V v) {
47 throw new NullPointerException("use addLast(value), not add(value) in List for JavaScript compatibility");
50 public boolean addLast(V v) {
52 * no overloading of add(Object) in JavaScript
56 * return this.add1(v);
70 public boolean remove(Object v) {
71 throw new NullPointerException("use removeObj(obj), not remove(obj) in List for JavaScript compatibility");
74 public boolean removeObj(Object v) {
76 * no overloading of remove(Object) in JavaScript
80 * return this.removeObject(v);
84 return super.remove(v);