Hello People
I have a question:
We implement the Sample XmlTree.
Now the TreeNode-Class (XmlEntry) represents a node in the dom of the
XmlObject.
To identify a node we must implement an equals- and a hashCode-method.
I implemented this methods like this:
public int hashCode()
{
return this.m_currentXml.hashCode();
}
public boolean equals(Object obj)
{
return this.m_currentXml.hashCode() == ((XmlEntry)obj).hashCode();
}
But with this I had a problem after a copy of the XmlObject. The
tree-expantion didn't work.
Ok, I looked in the hash hashCode-method of XmlObjectBase. And saw that
the hashCode-method
get on the hashCode-method of Object, which don't make a hash-code over
the value of the XmlObject.
Well this not the effect I need, I need a hash over the value of the
actual XmlObject.
I know this is a problem, cause what belongs to the value of the XmlObject?
For me this is:
- all thing what is visible when i save the XmlObject to a file
- the position of the XmlObject in the tree
Are there previous efforts to implement something like this?
Greets Flo
PS: Great implementation, thank you very much for this. Most notably the
integration of schema-types is very, very great and usefull.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]