Maybe instead: INCLUDE_AND_CONTINUE, INCLUDE_AND_PRUNE, EXCLUDE_AND_CONTINUE, EXCLUDE_AND_PRUNE,
because "stop" sounds that the traverser is stopping, where it's really just stopping that particular branch, i.e. prunes that branch. Or maybe even: INCLUDE, INCLUDE_AND_PRUNE, EXCLUDE, EXCLUDE_AND_PRUNE, 2010/11/19 David Montag <david.mon...@neotechnology.com> > Fantastic! I have yet to try the implementation out, but I'm positive that > it's an improvement. The only comment I have right now is the use of the > word "SKIP". IMO it is ambiguous with respect to stopping vs excluding. I > prefer EXCLUDE. Will try it out soon. Thanks Mattias! > > David > > On Thu, Nov 18, 2010 at 3:46 PM, Mattias Persson > <matt...@neotechnology.com>wrote: > > > 2010/11/18 Mattias Persson <matt...@neotechnology.com> > > > > > I just spent less than two hours making this change locally and > > everything > > > works and it generally feels great. Now that I've tried it out myself, > > this > > > way of controlling pruning/filtering feels more awesome. I'll post some > > > examples soon so that you can feedback :) > > > > > > > > Well, examples are maybe unecessary. > > > > class Evaluator > > Evaluation evaluate(Path path); > > > > enum Evaluation > > INCLUDE_AND_CONTINUE > > INCLUDE_AND_STOP > > SKIP_AND_CONTINUE > > SKIP_AND_STOP > > > > class TraversalDescription > > +evaluator(Evaluator) > > -prune(PruneEvaluator) > > -filter(Predicate<Path>) > > > > Also I've added lots of useful evaluators in an "Evaluators" class, but > > maybe those should reside in Traversal class instead, however I think > > Traversal class is a little bloated as it is now. > > > > There's the decision whether or not this thing could go into 1.2 or > not... > > For one thing it breaks the API, but then again the > > PruneEvaluator/Predicate<Path> (filter) can still be there, mimicing > > Evaluators in the background. Because a PruneEvaluator can be seen as an > > Evaluator which instead of true/false returns > > INCLUDE_AND_CONTINUE/INCLUDE_AND_STOP and a filter can be seen as an > > Evaluator which instead of true/false returns > > INCLUDE_AND_CONTINUE/SKIP_AND_CONTINUE. And you can have multiple > > evaluators > > just as you can with pruners/filters. > > > > This API seems more flexible and this will, in most cases, yield better > > traversal performance as well. > > > > -- > > Mattias Persson, [matt...@neotechnology.com] > > Hacker, Neo Technology > > www.neotechnology.com > > _______________________________________________ > > Neo4j mailing list > > User@lists.neo4j.org > > https://lists.neo4j.org/mailman/listinfo/user > > > > > > -- > David Montag > Neo Technology, www.neotechnology.com > Cell: 650.556.4411 > david.mon...@neotechnology.com > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > -- Mattias Persson, [matt...@neotechnology.com] Hacker, Neo Technology www.neotechnology.com _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user