Working with Attributes and list of attributes, I've realized that
AbstractNode class do not implement the hashCode or equals methods.
Why? They are necessary in order to work with collections and be able to
compare objects.

For example if you create two identical objects and compare them with
equals, the result is false.

org.dom4j.tree.DefaultAttribute obj1 = new
org.dom4j.tree.DefaultAttribute("name","Peter");
org.dom4j.tree.DefaultAttribute obj2 = new
org.dom4j.tree.DefaultAttribute("name","Peter");
boolean equal = obj1.equals(obj2);
// It returns 'false', when it should return 'true'.

Regards,
    César.


begin:vcard 
n:;
x-mozilla-html:TRUE
adr:;;;;;;
version:2.1
title;quoted-printable:<!doctype html public "-//w3c//dtd html 4.0 transitional//en"><html><head></head><body><font face=3D"Arial,Helvetica" color=3D"#3333FF" size=3D+2><a href=3D"http://www.aqs.es";>AQS S.L.</a></font><font size=3D-1><table BORDER=3D0 CELLSPACING=3D0 CELLPADDING=3D0><tr><td COLSPAN=3D"2"><BR>C&eacute=3Bsar &Aacute=3Blvarez N&uacute=3B&ntilde=3Bez - Software Engineer</font></td></tr><tr><td>E-mail</td><td><a href=3D"mailto:[EMAIL PROTECTED]";>[EMAIL PROTECTED]</a></td></tr><tr><td>Phone</td><td>+34 914316047</td></tr><tr><td>Address&nbsp=3B&nbsp=3B</td><td>C/Jorge Ju&aacute=3Bn, 30, 6th floor. 28001 Madrid, Spain</td></tr></table></font></body></html>
end:vcard

Reply via email to