01: /* DataTable.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.util.Iterator;
22:
23: /**
24: * Represents a table of data.
25: *
26: * @author Adam
27: * @version $Id: DataTable.java,v 1.1 2005/12/03 12:51:41 adamskogman Exp $
28: */
29: public interface DataTable {
30:
31: /**
32: * The number of DataRow:s in this table.
33: *
34: * @return 0 or more.
35: */
36: public abstract int getRowCount();
37:
38: /**
39: * Get Iterator over the DataRow:s. The order of the rows must be preserved from the underlying storage.
40: *
41: * @return Iterator of (@link DataRow), never null.
42: */
43: public abstract Iterator rowIterator();
44:
45: /**
46: * Get the table name.
47: *
48: * @return Never null.
49: */
50: public abstract String getName();
51:
52: /**
53: * @param rowId
54: * @return The row, if found
55: */
56: public abstract DataRow findRowById(String rowId);
57:
58: }
|