Class DataSetBuilderTable

java.lang.Object
com.github.mjeanroy.dbunit.core.dataset.DataSetBuilderTable

public final class DataSetBuilderTable extends Object
Immutable representation of a database table consisting of a name and an ordered list of rows.
  • Method Details

    • getTableName

      public String getTableName()
      Returns the logical table name.
      Returns:
      Table name (never null or empty).
    • rowCount

      public int rowCount()
      Returns the number of rows in this table.
      Returns:
      Row count.
    • getRows

      public List<DataSetBuilderRow> getRows()
      Returns an unmodifiable list of all rows.
      Returns:
      List of rows.
    • getRow

      public DataSetBuilderRow getRow(int index)
      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 Optional containing the first matching row, or empty if none match.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object