private static boolean isEqualOrNull ( String left , String right ) { return ( left != null && left . equals ( right ) ) || ( left == null && right == null ) ; }
Compares two strings for equality ; if both strings are null they are considered equal .