public boolean equals(final User user1, final User user2) {
   if ((user1 != null) && (user2 != null)) {
     return IdentifierUtils.equalsInLowerCase(user1.getName(), user2.getName());
   } else if (user1 == null) {
     return user2.getName() == null;
   }
   return user1.getName() == null;
 }
 public boolean equals(final String user1Name, final User user2) {
   final String name = (user2 != null) ? user2.getName() : null;
   if ((user1Name != null) && (user2 != null)) {
     return IdentifierUtils.equalsInLowerCase(user1Name, name);
   } else if (user1Name == null) {
     return name == null;
   }
   return user1Name == null;
 }