This function returns true if the object passed matches
the principal represented in this implementation
// XXX for bug 4889642: if groupA and userA have
// the same name, then groupA.equals(userA) return false
// BUT userA.equals(groupA) return "true"
if (another instanceof Group) {
return false;
} else if (another instanceof PrincipalImpl) {
Principal p = (Principal) another;
return getName().equals(p.getName());
} else
return false;