public static boolean compareStringLists ( List < String > list1 , List < String > list2 ) { if ( list1 == null && list2 == null ) return true ; if ( list1 == null || list2 == null ) return false ; if ( list1 . size ( ) != list2 . size ( ) ) return false ; for ( int i = 0 ; i < list1 . size ( ) ; i ++ ) { if ( ! compareStrings ( list1 . get ( i ) , list2 . get ( i ) ) ) { return false ; } } return true ; }
Compares two lists of strings for equality .