public static boolean hasRole(String roleName){
  for (  String role : getRoles()) {
    if (role.equalsIgnoreCase(roleName)) {
      return true;
    }
  }
  return false;
}

public static boolean hasRole ( String roleName ) { for ( String role : getRoles ( ) ) { if ( role . equalsIgnoreCase ( roleName ) ) { return true ; } } return false ; }
tell whether the passed role is set ?
