public static < S > boolean solutionListsAreEquals ( List < S > solutionList , List < S > newSolutionList ) { boolean found ; for ( int i = 0 ; i < solutionList . size ( ) ; i ++ ) { int j = 0 ; found = false ; while ( j < newSolutionList . size ( ) ) { if ( solutionList . get ( i ) . equals ( newSolutionList . get ( j ) ) ) { found = true ; } j ++ ; } if ( ! found ) { return false ; } } return true ; }
Compares two solution lists to determine if both are equals