[Neo4j] Node safe in a Set

2011-03-15 Thread Massimo Lusetti
It's safe to use Node in a Set... I don't see it implements equals() nor hashCode() Cheers -- Massimo http://meridio.blogspot.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user

Re: [Neo4j] Node safe in a Set

2011-03-15 Thread Chris Gioran
On Tue, Mar 15, 2011 at 5:17 PM, Massimo Lusetti wrote: > It's safe to use Node in a Set... I don't see it implements > equals() nor hashCode() Of course it does! Node is the interface implemented by NodeProxy - the objects you get back and use as Nodes. NodeProxy implement equals() and hashCode(

Re: [Neo4j] Node safe in a Set

2011-03-15 Thread Massimo Lusetti
On Tue, Mar 15, 2011 at 4:26 PM, Chris Gioran wrote: > Of course it does! Node is the interface implemented by NodeProxy - > the objects you get back and use as Nodes. NodeProxy implement > equals() and hashCode() based on the id of the Node. Using them in a > Collection is safe. Thanks for the

Re: [Neo4j] Node safe in a Set

2011-03-15 Thread Anders Nawroth
What you can't have in a Set is RelationshipTypes. But that's clearly stated in the javadocs. /anders 2011-03-15 16:34, Massimo Lusetti skrev: > On Tue, Mar 15, 2011 at 4:26 PM, Chris Gioran > wrote: > >> Of course it does! Node is the interface implemented by NodeProxy - >> the objects you get