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