@Override public boolean equals(Object o){
  if (o == null)   return false;
  if (o == this)   return true;
  if (!(o instanceof Attribute))   return false;
  final Attribute attribute=(Attribute)o;
  if (name != null ? !name.equals(attribute.name) : attribute.name != null)   return false;
  if (compareValue)   if (value != null ? !value.equals(attribute.value) : attribute.value != null)   return false;
  return true;
}

@ Override public boolean equals ( Object o ) { if ( o == null ) return false ; if ( o == this ) return true ; if ( ! ( o instanceof Attribute ) ) return false ; final Attribute attribute = ( Attribute ) o ; if ( name != null ? ! name . equals ( attribute . name ) : attribute . name != null ) return false ; if ( compareValue ) if ( value != null ? ! value . equals ( attribute . value ) : attribute . value != null ) return false ; return true ; }
returns true if names of the attributes are the same .
