public static boolean isBold(AttributeSet a){
  Boolean bold=(Boolean)a.getAttribute(Bold);
  if (bold != null) {
    return bold.booleanValue();
  }
  return false;
}

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