KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > jwebunit > ExpectedCell


1 /********************************************************************************
2  * Copyright (c) 2001, ThoughtWorks, Inc.
3  * Distributed open-source, see full license under licenses/jwebunit_license.txt
4 **********************************/

5 package net.sourceforge.jwebunit;
6
7 /**
8  * Represents an expected cell of an html table - a string value spanning an
9  * indicated amount of columns.
10  *
11  * @author Jim Weaver
12  */

13 public class ExpectedCell {
14
15     private int colspan;
16     private String JavaDoc expectedValue;
17
18     /**
19      * Construct an expected cell with a default colspan of 1.
20      * @param expectedValue text expected within the cell.
21      */

22     public ExpectedCell(String JavaDoc expectedValue) {
23         this(expectedValue, 1);
24     }
25
26     /**
27      * Construct an expected cell with a specified colspan.
28      *
29      * @param expectedValue text expected within the cell.
30      * @param colspan number of columns the cell is expected to span.
31      */

32     public ExpectedCell(String JavaDoc expectedValue, int colspan) {
33         this.expectedValue = expectedValue;
34         this.colspan = colspan;
35     }
36
37     /**
38      * Return the colspan for this cell.
39      */

40     public int getColspan() {
41         return colspan;
42     }
43
44     /**
45      * Return the expected text for the cell.
46      */

47     public String JavaDoc getExpectedValue() {
48         return expectedValue;
49     }
50
51 }
52
Popular Tags