public static boolean isUnderline(AttributeSet a){
  Boolean underline=(Boolean)a.getAttribute(Underline);
  if (underline != null) {
    return underline.booleanValue();
  }
  return false;
}

public static boolean isUnderline ( AttributeSet a ) { Boolean underline = ( Boolean ) a . getAttribute ( Underline ) ; if ( underline != null ) { return underline . booleanValue ( ) ; } return false ; }
checks whether the underline attribute is set .
