Class DataSetBuilderTable
java.lang.Object
com.github.mjeanroy.dbunit.core.dataset.DataSetBuilderTable
Immutable representation of a database table consisting of a name and an
ordered list of rows.
-
Method Summary
Modifier and TypeMethodDescriptionbooleangetRow(int index) Returns the row at the specified index.getRow(Predicate<DataSetBuilderRow> predicate) Finds the first row matching the given predicate.getRows()Returns an unmodifiable list of all rows.Returns the logical table name.inthashCode()introwCount()Returns the number of rows in this table.toString()
-
Method Details
-
getTableName
Returns the logical table name.- Returns:
- Table name (never
nullor empty).
-
rowCount
public int rowCount()Returns the number of rows in this table.- Returns:
- Row count.
-
getRows
Returns an unmodifiable list of all rows.- Returns:
- List of rows.
-
getRow
Returns the row at the specified index.- Parameters:
index- Zero-based row index.- Returns:
- The matching row.
- Throws:
IndexOutOfBoundsException- if index is invalid.
-
getRow
Finds the first row matching the given predicate.- Parameters:
predicate- Test to apply to each row.- Returns:
- An
Optionalcontaining the first matching row, or empty if none match.
-
equals
-
hashCode
-
toString
-