code/app/be/objectify/deadbolt/java/DeadboltAnalyzer.java
public boolean hasRole(final Optional<? extends Subject> subjectOption,
                           final String roleName)
    {
        return getRoleNames(subjectOption).contains(roleName);
    }
public boolean hasRole(final Optional<? extends Subject> subjectOption,
                           final String roleName)
    {
        return getRoleNames(subjectOption).contains(roleName);
    }
public boolean hasRole ( final Optional < ? extends Subject > subjectOption , final String roleName ) { return getRoleNames ( subjectOption ) . contains ( roleName ) ; }
Check if the subject has the given role.

@param subjectOption an option for the subject
@param roleName      the name of the role
@return true iff the subject has the role represented by the role name
Check if the subject has the given role .