@Override
 boolean check(TraversalBranch source, boolean remember) {
   long idToCompare = type.getId(source);
   while ((source = source.parent()) != null) {
     if (type.idEquals(source, idToCompare)) {
       return false;
     }
   }
   return true;
 }
Пример #2
0
 @Override
 protected Double calculateValue(TraversalBranch next) {
   return next.length() == 0
       ? 0d
       : evaluator.getCost(next.lastRelationship(), Direction.OUTGOING);
 }