net.sourceforge.jwebunit.html
Class Cell

java.lang.Object
  extended by net.sourceforge.jwebunit.html.Cell

public class Cell
extends java.lang.Object

Represents a cell of an html table - a string value spanning an indicated amount of columns.

Author:
Jim Weaver, Julien Henry

Constructor Summary
Cell(java.lang.String value)
          Construct a cell with a default colspan/rowspan of 1.
Cell(java.lang.String value, int colspan, int rowspan)
          Construct a cell with a specified colspan.
 
Method Summary
 void assertEquals(Cell c)
          Assert that the current cell equals given one.
 void assertMatch(Cell c)
          Assert that the current cell matches given one.
 boolean equals(java.lang.String text)
          Check if the current cell contains given text.
 int getColspan()
           
 int getRowspan()
           
 java.lang.String getValue()
           
 boolean match(java.lang.String regexp)
          Check if the current cell matches given text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cell

public Cell(java.lang.String value)
Construct a cell with a default colspan/rowspan of 1.

Parameters:
value - text expected within the cell.

Cell

public Cell(java.lang.String value,
            int colspan,
            int rowspan)
Construct a cell with a specified colspan.

Parameters:
value - text expected within the cell.
colspan - number of columns the cell is expected to span.
rowspan - number of rows the cell is expected to span.
Method Detail

getColspan

public int getColspan()
Returns:
the colspan for this cell.

getRowspan

public int getRowspan()
Returns:
the rowspan for this cell.

getValue

public final java.lang.String getValue()
Returns:
the text for the cell.

assertEquals

public void assertEquals(Cell c)
Assert that the current cell equals given one. Check text, colspan and rowspan.

Parameters:
c - given cell

assertMatch

public void assertMatch(Cell c)
Assert that the current cell matches given one. Check colspan and rowspan. Regexp is in text of given cell.

Parameters:
c - given cell

equals

public boolean equals(java.lang.String text)
Check if the current cell contains given text.

Parameters:
text - given text.
Returns:
true if the current cell contains given text.

match

public boolean match(java.lang.String regexp)
Check if the current cell matches given text.

Parameters:
regexp - given regexp.
Returns:
true if the current cell matches given text.


Copyright © 2002-2011 SourceForge. All Rights Reserved.