public static boolean sameList ( final Object [ ] a , final Object [ ] b ) { if ( a == null || b == null || a . length != b . length ) { return false ; } for ( int i = 0 ; i < a . length ; i ++ ) { if ( ! a [ i ] . equals ( b [ i ] ) ) { return false ; } } return true ; }
Compares the contents of 2 arrays for equaliy .