public final class RangeByIsCountStrategy extends AbstractTraversalStrategy<TraversalStrategy.OptimizationStrategy> implements TraversalStrategy.OptimizationStrategy
CountGlobalStep
followed by an IsStep
. The idea is to limit
the number of incoming elements in a way that it's enough for the IsStep
to decide whether it evaluates
true
or false
. If the traversal already contains a user supplied limit, the strategy won't
modify it.__.outE().count().is(0) // is replaced by __.not(outE()) __.outE().count().is(lt(3)) // is replaced by __.outE().limit(3).count().is(lt(3)) __.outE().count().is(gt(3)) // is replaced by __.outE().limit(4).count().is(gt(3))
TraversalStrategy.DecorationStrategy, TraversalStrategy.FinalizationStrategy, TraversalStrategy.OptimizationStrategy, TraversalStrategy.ProviderOptimizationStrategy, TraversalStrategy.VerificationStrategy
STRATEGY
Modifier and Type | Method and Description |
---|---|
void |
apply(Traversal.Admin<?,?> traversal) |
static RangeByIsCountStrategy |
instance() |
equals, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
compareTo, getTraversalCategory
applyPost, applyPrior, getConfiguration
public static RangeByIsCountStrategy instance()
public void apply(Traversal.Admin<?,?> traversal)
apply
in interface TraversalStrategy<TraversalStrategy.OptimizationStrategy>
Copyright © 2013–2018 Apache Software Foundation. All rights reserved.