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: import java.util.List;
14: import java.util.Comparator;
15:
16: /**
17: * A list of nodes
18: *
19: * @author Pierre van Rooden
20: * @version $Id: BridgeList.java,v 1.10 2008/02/16 22:13:53 nklasens Exp $
21: * @param <E> Type of elements
22: * @since MMBase-1.6
23: */
24: public interface BridgeList<E> extends List<E> {
25:
26: /**
27: * Retrieves a property previously set for this list.
28: * Use this to store and retrieve metadata on whow teh listw as created
29: * (such as what sort-order was specified)
30: * @param key the key of the property
31: * @return the property value
32: */
33: public Object getProperty(Object key);
34:
35: /**
36: * Sets a property for this list.
37: * Use this to store and retrieve metadata on whow teh listw as created
38: * (such as what sort-order was specified)
39: * @param key the key of the property
40: * @param value the property value
41: */
42: public void setProperty(Object key, Object value);
43:
44: /**
45: * Sorts this list according to a default sort order.
46: */
47: public void sort();
48:
49: /**
50: * Sorts this list according to a specified sort order
51: *
52: * @param comparator the comparator defining the sort order
53: */
54: public void sort(Comparator<? super E> comparator); // ?
55:
56: public BridgeList<E> subList(int fromIndex, int toIndex);
57:
58: }
|