public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (o instanceof SimpleRole) {
            SimpleRole sr = (SimpleRole) o;
            //only check name, since role names should be unique across an entire application:
            return (getName() != null ? getName().equals(sr.getName()) : sr.getName() == null);
        }
        return false;
    }
A simple representation of a security role that has a name and a collection of permissions.  This object can be
used internally by Realms to maintain authorization state.

@since 0.2
core/src/main/java/org/apache/shiro/authz/SimpleRole.java