boolean isAnyState(Element element,State... states){
  String ordinalStr=element.getAttribute(ATTR_STATE);
  if (ordinalStr == null) {
    return false;
  }
  int ordinal=-1;
  try {
    ordinal=Integer.parseInt(ordinalStr);
  }
 catch (  NumberFormatException e) {
    return false;
  }
  for (  State state : states) {
    if (ordinal == state.ordinal()) {
      return true;
    }
  }
  return false;
}

boolean isAnyState ( Element element , State ... states ) { String ordinalStr = element . getAttribute ( ATTR_STATE ) ; if ( ordinalStr == null ) { return false ; } int ordinal = - 1 ; try { ordinal = Integer . parseInt ( ordinalStr ) ; } catch ( NumberFormatException e ) { return false ; } for ( State state : states ) { if ( ordinal == state . ordinal ( ) ) { return true ; } } return false ; }
check if the element is in any of the specified states .
