Class GroupGrantedAuthority

  • All Implemented Interfaces:
    Serializable, org.springframework.security.core.GrantedAuthority

    public class GroupGrantedAuthority
    extends Object
    implements org.springframework.security.core.GrantedAuthority
    Provides an Group GrantedAuthority adaptor.
    Since:
    3.6.0
    See Also:
    Serialized Form
    • Constructor Detail

      • GroupGrantedAuthority

        public GroupGrantedAuthority​(String groupName)
        Create a new GroupGrantedAuthority based on the given group name
        Parameters:
        groupName - and group name
    • Method Detail

      • getAuthority

        public String getAuthority()
        Return a string representation of the group name
        Specified by:
        getAuthority in interface org.springframework.security.core.GrantedAuthority
        Returns:
        the name of the group name
        See Also:
        GrantedAuthority.getAuthority()
      • compareTo

        public int compareTo​(Object o)
        Compares this GrantedAuthorityAdaptor with another for order
        Parameters:
        o - another non-null GrantedAuthority
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object
        See Also:
        Comparable.compareTo(Object)
      • toString

        public String toString()
        Return the string representation of this object.
        Overrides:
        toString in class Object
        Returns:
        the string representation of this object