public static < T > boolean isEqual ( final T first , final T second ) { /* test to see if they are both null, or both reference the same object */ if ( first == second ) return true ; if ( first == null && second != null ) return false ; return first . equals ( second ) ; }
Provides an easy way to see if two possibly null objects are equal