public boolean isDefined(Object key){
  Object[] a=attributes;
  int n=a.length;
  for (int i=0; i < n; i+=2) {
    if (key.equals(a[i])) {
      return true;
    }
  }
  return false;
}

public boolean isDefined ( Object key ) { Object [ ] a = attributes ; int n = a . length ; for ( int i = 0 ; i < n ; i += 2 ) { if ( key . equals ( a [ i ] ) ) { return true ; } } return false ; }
checks whether a given attribute is defined .
