Interface ToColumnFromChange<C extends ColumnElement>

Type Parameters:
C - The class of a assertion on a column (an sub-class of ColumnElement).
All Superinterfaces:
Navigation
All Known Subinterfaces:
OriginWithColumnsAndRowsFromChange<CHS,CH,C,R>, OriginWithValuesFromColumn<CHS,CH,C,R,V>, OriginWithValuesFromRow<CHS,CH,C,R,V>
All Known Implementing Classes:
AbstractAssertWithOriginWithColumnsAndRowsFromChange, AbstractAssertWithValues, AbstractOutputterWithOriginWithColumnsAndRowsFromChange, AbstractOutputterWithValues, ChangeAssert, ChangeColumnAssert, ChangeColumnOutputter, ChangeColumnValueAssert, ChangeColumnValueOutputter, ChangeOutputter, ChangeRowAssert, ChangeRowOutputter, ChangeRowValueAssert, ChangeRowValueOutputter

public interface ToColumnFromChange<C extends ColumnElement> extends Navigation
Defines methods to navigate to a modified Column from a Change.

The different methods return an assertion on one column ColumnElement.

These methods exists when navigating (at the beginning assertThat()) from changes.

The difference with ToColumn is that ToColumn allows to navigate in all the columns of a Change and the methods of ToColumnFromChange count only the columns with a modification between the start point and the end point.

As shown in the diagram below, it is possible to call the method to navigate to a ColumnElement from :

diagram with navigation to column

It is important to keep in mind that the methods are executed from the point of view of the last instance with assertion methods on a change (ChangeAssert).
So all the lines of code below are equivalent : they point on the column at index 1 (as usual, the list start at index 0) among the modified columns.

 
 assertThat(changes).change().columnAmongTheModifiedOnes(1)......;                                                    // Point directly on the column at index 1
 // Use the returnToChange() method to return on the change and access to the next/second column of the list
 assertThat(changes).change().columnAmongTheModifiedOnes().returnToChange().columnAmongTheModifiedOnes()......;
 assertThat(changes).change().columnAmongTheModifiedOnes().columnAmongTheModifiedOnes()......;                        // Same as precedent but returnToChange() is implicit
 assertThat(changes).change().column().columnAmongTheModifiedOnes(1)......;                                           // The method with the index can be call too
 assertThat(changes).change().columnAmongTheModifiedOnes(2).column(0).columnAmongTheModifiedOnes(1)......;            // Idem
 assertThat(changes).change().columnAmongTheModifiedOnes().value().columnAmongTheModifiedOnes()......;
 assertThat(changes).change().column().value().columnAmongTheModifiedOnes(1)......;
 // Equivalent to the precedent but with the use of the methods to return to origin
 assertThat(changes).change().columnAmongTheModifiedOnes().value().returnToColumn().returnToChange().columnAmongTheModifiedOnes(1)......;
 
 
Author:
Régis Pouiller