code: public boolean hasRole(final Optional<? extends Subject> subjectOption,
                             final String roleName)
      {
          return getRoleNames(subjectOption).contains(roleName);
      }
docs: 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