public static boolean equalObjects ( Object o1 , Object o2 ) { if ( o1 == null ) { return ( o2 == null ) ; } else if ( o2 == null ) { return false ; } else { return o1 . equals ( o2 ) ; } }
Utility function to make it easy to compare two possibly null objects .