KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ozoneDB > collections > _BaseList_SubList


1 /*
2  * $Id: _BaseList_SubList.java,v 1.1 2003/10/02 09:01:39 leomekenkamp Exp $
3  * This file is based on AbstractList.java from GNU Classpath. Quote:
4
5 AbstractList.java -- Abstract implementation of most of List
6 Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
7
8 This file is part of GNU Classpath.
9
10 GNU Classpath is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2, or (at your option)
13 any later version.
14
15 GNU Classpath is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with GNU Classpath; see the file COPYING. If not, write to the
22 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
23 02111-1307 USA.
24
25 Linking this library statically or dynamically with other modules is
26 making a combined work based on this library. Thus, the terms and
27 conditions of the GNU General Public License cover the whole
28 combination.
29
30 As a special exception, the copyright holders of this library give you
31 permission to link this library with independent modules to produce an
32 executable, regardless of the license terms of these independent
33 modules, and to copy and distribute the resulting executable under
34 terms of your choice, provided that you also meet, for each linked
35 independent module, the terms and conditions of the license of that
36 module. An independent module is a module which is not derived from
37 or based on this library. If you modify this library, you may extend
38 this exception to your version of the library, but you are not
39 obligated to do so. If you do not wish to do so, delete this
40 exception statement from your version.
41
42  * end quote.
43  *
44  * This file is licenced under the same conditions as its original (GPL +
45  * "special exception").
46  */

47
48 package org.ozoneDB.collections;
49
50 import java.util.ConcurrentModificationException JavaDoc;
51
52 /**
53  * This class follows the implementation requirements set forth in
54  * {@link java.util.AbstractList#subList(int, int)}. It matches Sun's implementation
55  * by using a non-public top-level class in the same package.
56  *
57  * @author Original author unknown
58  * @author Eric Blake <ebb9@email.byu.edu>
59  * @author ported to Ozone by Leo Mekenkamp
60  */

61 public interface _BaseList_SubList extends BaseList {
62
63     /**
64      * This method checks the two modCount fields to ensure that there has
65      * not been a concurrent modification, returning if all is okay.
66      *
67      * @throws ConcurrentModificationException if the backing list has been
68      * modified externally to this sublist
69      */

70     public void _org_ozoneDB_checkMod();
71
72     /**
73      * This method checks that a value is between 0 and size (inclusive). If
74      * it is not, an exception is thrown.
75      *
76      * @param index the value to check
77      * @throws IndexOutOfBoundsException if the value is out of range
78      */

79     public void _org_ozoneDB_checkBoundsInclusive(int index);
80
81     /**
82      * This method checks that a value is between 0 (inclusive) and size
83      * (exclusive). If it is not, an exception is thrown.
84      *
85      * @param index the value to check
86      * @throws IndexOutOfBoundsException if the value is out of range
87      */

88     public void _org_ozoneDB_checkBoundsExclusive(int index);
89
90     /**
91      * Returns the offset of this sublist relative to the backing list.
92      *
93      * @return offset into backinglist
94      */

95     public int _org_ozoneDB_getOffset();
96
97     /**
98      * Called by an iterator when it removes an item from this sublist or inserts
99      * an item.
100      */

101     public void _org_ozoneDB_incSize(int amount);
102
103     public void _org_ozoneDB_syncModCountWithBackingList();
104
105 }
106
Popular Tags