public boolean equals(Object object){
  if (!(object instanceof Attribute)) {
    return false;
  }
  Attribute val=(Attribute)object;
  if (value == null) {
    if (val.getValue() == null) {
      return name.equals(val.getName());
    }
 else {
      return false;
    }
  }
  return ((name.equals(val.getName())) && (value.equals(val.getValue())));
}

public boolean equals ( Object object ) { if ( ! ( object instanceof Attribute ) ) { return false ; } Attribute val = ( Attribute ) object ; if ( value == null ) { if ( val . getValue ( ) == null ) { return name . equals ( val . getName ( ) ) ; } else { return false ; } } return ( ( name . equals ( val . getName ( ) ) ) && ( value . equals ( val . getValue ( ) ) ) ) ; }
compares the current attribute object with another attribute object .
