I agree, lets keep it immutable, then its safe to keep the expander around.


Two suggestions:
Your could provide a reusable expander:

Expander e = Expanders.outgoing().along(FRIEND).and(ENEMY);

for(Node n:e.expand(node)){
...
}

or a onetime expander:

for(Node n : node.expand().outgoing().along(FRIEND).and(ENEMY)){
...
}

OR

for(Node n : node.expand().outgoing().include(FRIEND).include(ENEMY)){
...
}

OR

for(Node n : node.expand().outgoing().with(FRIEND).with(ENEMY)){
...
}

-atle
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to