01: /* DataSet.java
02: *
03: * DDSteps - Data Driven JUnit Test Steps
04: * Copyright (C) 2005 Jayway AB
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License version 2.1 as published by the Free Software Foundation.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library; if not, visit
17: * http://www.opensource.org/licenses/lgpl-license.php
18: */
19: package org.ddsteps.dataset;
20:
21: import java.io.Serializable;
22: import java.util.Iterator;
23:
24: /**
25: * An ordered collection of DataTable:s. Read-only interface.
26: *
27: * @author Adam
28: * @version $Id: DataSet.java,v 1.2 2006/01/31 10:24:10 marthursson Exp $
29: */
30: public interface DataSet extends Serializable {
31:
32: /**
33: * Gets all tables names. The order of the names will correspond to the
34: * order of the tables.
35: *
36: * @return Possibly empty, never null.
37: */
38: public abstract String[] getTableNames();
39:
40: /**
41: * Get iterator over all tables. The natural order of the managed
42: * DataTable:s will be reflected in the iterator.
43: *
44: * @return Iterator of (@link DataTable), never null.
45: */
46: public abstract Iterator tableIterator();
47:
48: /**
49: * Get table by name.
50: *
51: * @param tableName
52: * @return Null if not found
53: */
54: public abstract DataTable getTable(String tableName);
55:
56: }
|