00001 package ca.mcgill.sable.util; 00002 00003 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00004 * SableUtil, a clean room implementation of the Collection API. * 00005 * Copyright (C) 1997, 1998 Etienne Gagnon (gagnon@sable.mcgill.ca). * 00006 * All rights reserved. * 00007 * * 00008 * This work was done as a project of the Sable Research Group, * 00009 * School of Computer Science, McGill University, Canada * 00010 * (http://www.sable.mcgill.ca/). It is understood that any * 00011 * modification not identified as such is not covered by the * 00012 * preceding statement. * 00013 * * 00014 * This work is free software; you can redistribute it and/or * 00015 * modify it under the terms of the GNU Library General Public * 00016 * License as published by the Free Software Foundation; either * 00017 * version 2 of the License, or (at your option) any later version. * 00018 * * 00019 * This work is distributed in the hope that it will be useful, * 00020 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00022 * Library General Public License for more details. * 00023 * * 00024 * You should have received a copy of the GNU Library General Public * 00025 * License along with this library; if not, write to the * 00026 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * 00027 * Boston, MA 02111-1307, USA. * 00028 * * 00029 * To submit a bug report, send a comment, or get the latest news on * 00030 * this project and other Sable Research Group projects, please * 00031 * visit the web site: http://www.sable.mcgill.ca/ * 00032 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 00033 00034 /* 00035 Reference Version 00036 ----------------- 00037 This is the latest official version on which this file is based. 00038 The reference version is: $SableUtilVersion: 1.11 $ 00039 00040 Change History 00041 -------------- 00042 A) Notes: 00043 00044 Please use the following template. Most recent changes should 00045 appear at the top of the list. 00046 00047 - Modified on [date (March 1, 1900)] by [name]. [(*) if appropriate] 00048 [description of modification]. 00049 00050 Any Modification flagged with "(*)" was done as a project of the 00051 Sable Research Group, School of Computer Science, 00052 McGill University, Canada (http://www.sable.mcgill.ca/). 00053 00054 You should add your copyright, using the following template, at 00055 the top of this file, along with other copyrights. 00056 00057 * * 00058 * Modifications by [name] are * 00059 * Copyright (C) [year(s)] [your name (or company)]. All rights * 00060 * reserved. * 00061 * * 00062 00063 B) Changes: 00064 00065 - Modified on July 23, 1998 by Etienne Gagnon (gagnon@sable.mcgill.ca). (*) 00066 Added toArray(Object[]). 00067 00068 - Modified on June 7, 1998 by Etienne Gagnon (gagnon@sable.mcgill.ca). (*) 00069 Changed the license. 00070 */ 00071 00072 public interface List extends Collection 00073 { 00074 void add(int index, Object element) 00075 throws UnsupportedOperationException, ClassCastException, 00076 IllegalArgumentException, ArrayIndexOutOfBoundsException; 00077 boolean add(Object o) 00078 throws UnsupportedOperationException, ClassCastException, IllegalArgumentException; 00079 boolean addAll(int index, Collection c) 00080 throws UnsupportedOperationException, ClassCastException, 00081 IllegalArgumentException, ArrayIndexOutOfBoundsException; 00082 boolean addAll(Collection c) 00083 throws UnsupportedOperationException, ClassCastException, IllegalArgumentException; 00084 void clear() 00085 throws UnsupportedOperationException; 00086 boolean contains(Object o); 00087 boolean containsAll(Collection c); 00088 boolean equals(Object o); 00089 Object get(int index) 00090 throws ArrayIndexOutOfBoundsException; 00091 int hashCode(); 00092 int indexOf(Object o); 00093 int indexOf(Object o, int index) 00094 throws ArrayIndexOutOfBoundsException; 00095 boolean isEmpty(); 00096 Iterator iterator(); 00097 int lastIndexOf(Object o); 00098 int lastIndexOf(Object o, int index) 00099 throws ArrayIndexOutOfBoundsException; 00100 ListIterator listIterator(); 00101 ListIterator listIterator(int index) 00102 throws ArrayIndexOutOfBoundsException; 00103 Object remove(int index) 00104 throws UnsupportedOperationException, ArrayIndexOutOfBoundsException; 00105 boolean remove(Object o) 00106 throws UnsupportedOperationException; 00107 boolean removeAll(Collection c) 00108 throws UnsupportedOperationException; 00109 void removeRange(int fromIndex, int toIndex) 00110 throws UnsupportedOperationException, ArrayIndexOutOfBoundsException; 00111 boolean retainAll(Collection c) 00112 throws UnsupportedOperationException; 00113 Object set(int index, Object element) 00114 throws UnsupportedOperationException, ClassCastException, 00115 IllegalArgumentException, ArrayIndexOutOfBoundsException; 00116 int size(); 00117 Object[] toArray(); 00118 void toArray(Object[] a); 00119 }