Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / libFMap_data / src / org / gvsig / fmap / data / DataCollection.java @ 23675

History | View | Annotate | Download (1.58 KB)

1
package org.gvsig.fmap.data;
2

    
3
import java.util.Collection;
4
import java.util.Iterator;
5

    
6
import org.gvsig.tools.observer.Observer;
7

    
8
/**
9
 * <p> Interface that extends java.util.Collection. Represents 
10
 * a group of data elements (similar Recordset of JDBC). It`s used 
11
 * in a generic way as a collection of elements, regardless of that`s
12
 * the result of a data consult, a selection or a collection of 
13
 * blocked elements.</p>
14
 * 
15
 * @author 
16
 *
17
 */
18
public interface DataCollection extends Collection, Observer{
19
        public void dispose(); 
20
        
21
    public boolean isFromStore(DataStore store);
22

    
23
    /**
24
     * Returns an iterator over the elements in this collection, in the order
25
     * (if any) defined when the collection was obtained.
26
     * 
27
     * The iterator starts at the specified position in this collection. The
28
     * specified index indicates the first element that would be returned by an
29
     * initial call to the <tt>next</tt> method. An initial call to the
30
     * <tt>previous</tt> method would return the element with the specified
31
     * index minus one.
32
     * 
33
     * @param index
34
     *            index of first element to be returned from the iterator (by a
35
     *            call to the <tt>next</tt> method).
36
     * @return an iterator of the elements in this collection (in proper
37
     *         sequence), starting at the specified position in the collection.
38
     * @throws IndexOutOfBoundsException
39
     *             if the index is out of range (index &lt; 0 || index &gt;
40
     *             size()).
41
     */
42
    Iterator iterator(int index);
43
}