01: /*
02:
03: This software is OSI Certified Open Source Software.
04: OSI Certified is a certification mark of the Open Source Initiative.
05:
06: The license (Mozilla version 1.0) can be read at the MMBase site.
07: See http://www.MMBase.org/license
08:
09: */
10:
11: package org.mmbase.bridge;
12:
13: /**
14: * A list of nodes
15: *
16: * @author Pierre van Rooden
17: * @version $Id: NodeList.java,v 1.13 2007/02/10 15:47:42 nklasens Exp $
18: */
19: public interface NodeList extends BridgeList<Node> {
20:
21: /**
22: * In the propery of the list with this name you find back the original Query object
23: * by which this NodeList was created (if it as created like that)
24: * @since MMBase-1.7
25: */
26: public static final String QUERY_PROPERTY = "query";
27:
28: /**
29: * The node-step property will be set on a cluster node list which is the result of a {@link
30: * NodeQuery} (which can also result 'real' nodes). This happens when you can
31: * {@link Cloud#getList(Query)} with a NodeQuery argument.
32: * @since MMBase-1.8
33: */
34: public static final String NODESTEP_PROPERTY = "nodestep";
35:
36: /**
37: * Returns the Node at the indicated postion in the list
38: * @param index the position of the Node to retrieve
39: * @return Node at the indicated postion
40: */
41: public Node getNode(int index);
42:
43: /**
44: * Returns an type-specific iterator for this list.
45: * @return Node iterator
46: */
47: public NodeIterator nodeIterator();
48:
49: /**
50: * Returns a sublist of this list.
51: * @param fromIndex the position in the current list where the sublist starts (inclusive)
52: * @param toIndex the position in the current list where the sublist ends (exclusive)
53: * @return sublist of this list
54: */
55: public NodeList subNodeList(int fromIndex, int toIndex);
56:
57: }
|