X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=src%2Fjavajs%2Futil%2FLst.java;fp=src%2Fjavajs%2Futil%2FLst.java;h=8d5d62c0c38610b51f4b93635502caf25d9b9771;hp=6257c1f842a5cd135a1077ecb61b3b2b772e6201;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/src/javajs/util/Lst.java b/src/javajs/util/Lst.java index 6257c1f..8d5d62c 100644 --- a/src/javajs/util/Lst.java +++ b/src/javajs/util/Lst.java @@ -1,88 +1,88 @@ -/* $RCSfile$ - * $Author: hansonr $ - * $Date: 2007-04-26 16:57:51 -0500 (Thu, 26 Apr 2007) $ - * $Revision: 7502 $ - * - * Copyright (C) 2005 The Jmol Development Team - * - * Contact: jmol-developers@lists.sf.net - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package javajs.util; - -import java.util.ArrayList; - -/** - * created to remove ambiguities in add and remove - * - * @param - */ -public class Lst extends ArrayList { - - public Lst() { - super(); - } - - /** - * @j2sIgnore - * - */ - @Override - @Deprecated - public boolean add(V v) { - throw new NullPointerException("use addLast(value), not add(value) in List for JavaScript compatibility"); - } - - public boolean addLast(V v) { - /** - * no overloading of add(Object) in JavaScript - * - * @j2sNative - * - * return this.add1(v); - * - */ - { - return super.add(v); - } - } - - /** - * @j2sIgnore - * - */ - @Override - @Deprecated - public boolean remove(Object v) { - throw new NullPointerException("use removeObj(obj), not remove(obj) in List for JavaScript compatibility"); - } - - public boolean removeObj(Object v) { - /** - * no overloading of remove(Object) in JavaScript - * - * @j2sNative - * - * return this.removeObject(v); - * - */ - { - return super.remove(v); - } - } - -} +/* $RCSfile$ + * $Author: hansonr $ + * $Date: 2007-04-26 16:57:51 -0500 (Thu, 26 Apr 2007) $ + * $Revision: 7502 $ + * + * Copyright (C) 2005 The Jmol Development Team + * + * Contact: jmol-developers@lists.sf.net + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package javajs.util; + +import java.util.ArrayList; + +/** + * created to remove ambiguities in add and remove + * + * @param + */ +public class Lst extends ArrayList { + + public Lst() { + super(); + } + + /** + * @j2sIgnore + * + */ + @Override + @Deprecated + public boolean add(V v) { + throw new NullPointerException("use addLast(value), not add(value) in List for JavaScript compatibility"); + } + + public boolean addLast(V v) { + /** + * no overloading of add(Object) in JavaScript + * + * @j2sNative + * + * return this.add1(v); + * + */ + { + return super.add(v); + } + } + + /** + * @j2sIgnore + * + */ + @Override + @Deprecated + public boolean remove(Object v) { + throw new NullPointerException("use removeObj(obj), not remove(obj) in List for JavaScript compatibility"); + } + + public boolean removeObj(Object v) { + /** + * no overloading of remove(Object) in JavaScript + * + * @j2sNative + * + * return this.removeObject(v); + * + */ + { + return super.remove(v); + } + } + +}