private static boolean isSupersededBy ( List < Problem > apars1 , List < Problem > apars2 ) { boolean result = true ; // Now iterate over the current list of problems, and see if the incoming IFixInfo contains all of the problems from this IfixInfo. // If it does then return true, to indicate that this IFixInfo object has been superseded. for ( Iterator < Problem > iter1 = apars1 . iterator ( ) ; iter1 . hasNext ( ) ; ) { boolean currAparMatch = false ; Problem currApar1 = iter1 . next ( ) ; for ( Iterator < Problem > iter2 = apars2 . iterator ( ) ; iter2 . hasNext ( ) ; ) { Problem currApar2 = iter2 . next ( ) ; if ( currApar1 . getDisplayId ( ) . equals ( currApar2 . getDisplayId ( ) ) ) { currAparMatch = true ; } } if ( ! currAparMatch ) result = false ; } return result ; }
Returns if the apars list apars1 is superseded by apars2 . Apars1 is superseded by apars2 if all the apars in apars1 is also included in apars2