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.util;
12:
13: import org.mmbase.bridge.*;
14: import java.util.*;
15:
16: /**
17: * As AbstractSequentialList, but implements some extra methods required by BridgeList
18: *
19: *
20: * @author Michiel Meeuwissen
21: * @version $Id: AbstractSequentialBridgeList.java,v 1.5 2007/02/24 21:57:50 nklasens Exp $
22: * @since MMBase-1.7
23: */
24:
25: abstract public class AbstractSequentialBridgeList<E extends Comparable<? super E>>
26: extends AbstractSequentialList<E> implements BridgeList<E> {
27:
28: private Map<Object, Object> properties = new HashMap<Object, Object>();
29:
30: // javadoc inherited
31: public Object getProperty(Object key) {
32: return properties.get(key);
33: }
34:
35: // javadoc inherited
36: public void setProperty(Object key, Object value) {
37: properties.put(key, value);
38: }
39:
40: // javadoc inherited
41: public void sort() {
42: Collections.sort(this );
43: }
44:
45: // javadoc inherited
46: public void sort(Comparator<? super E> comparator) {
47: Collections.sort(this , comparator);
48: }
49:
50: abstract public BridgeList<E> subList(int a, int b);
51:
52: }
|