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.implementation;
12:
13: import java.util.Collection;
14: import org.mmbase.bridge.StringList;
15: import org.mmbase.bridge.StringIterator;
16:
17: /**
18: * A list of Strings
19: *
20: * @author Pierre van Rooden
21: * @version $Id: BasicStringList.java,v 1.13 2007/02/10 15:47:42 nklasens Exp $
22: */
23: public class BasicStringList extends BasicList<String> implements
24: StringList {
25:
26: static final StringList EMPTY = org.mmbase.bridge.util.BridgeCollections.EMPTY_STRINGLIST;
27:
28: BasicStringList() {
29: super ();
30: }
31:
32: BasicStringList(Collection<String> c) {
33: super (c);
34: }
35:
36: public String getString(int index) {
37: return get(index);
38: }
39:
40: public StringIterator stringIterator() {
41: return new BasicStringIterator();
42: }
43:
44: protected class BasicStringIterator extends BasicIterator implements
45: StringIterator {
46:
47: public String nextString() {
48: return next();
49: }
50:
51: public String previousString() {
52: return previous();
53: }
54: }
55: }
|