@ Override public void resetValues ( ) { int length = constraints . size ( ) ; for ( int i = length - 1 ; i >= 0 ; i -- ) { Constraint c = constraints . get ( i ) ; c . resetValues ( ) ; if ( dependent && c . hasNextCase ( ) ) { // reset all constraints below // only if the constraint above still has a case to be processed for ( int j = i + 1 ; j < length ; j ++ ) { constraints . get ( j ) . resetCase ( ) ; } break ; } } }
Resets the values of the sub - constraints . To achieve this the list of sub - constraints is passed backwards . If all sub - constraints are independent of each other simply all sub - constraints will be reset . However if they are dependent the case of all constraints in the list below the first constraint which still has to process a test case will be reset and the run will be canceled . This way all the cases of the last sub - constraints will be run first . Then the next case will be called in the penultimate sub - constraint . Again all cases of the last one will be run etc .