public static boolean isSuperscript(AttributeSet a){
  Boolean superscript=(Boolean)a.getAttribute(Superscript);
  if (superscript != null) {
    return superscript.booleanValue();
  }
  return false;
}

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