public final class IdentityRemovalStrategy extends AbstractTraversalStrategy<TraversalStrategy.OptimizationStrategy> implements TraversalStrategy.OptimizationStrategy
IdentityRemovalStrategy
looks for IdentityStep
instances and removes them.
If the identity step is labeled, its labels are added to the previous step.
If the identity step is labeled and its the first step in the traversal, it stays.
__.out().identity().count() // is replaced by __.out().count() __.in().identity().as("a") // is replaced by __.in().as("a") __.identity().as("a").out() // is replaced by __.identity().as("a").out()
TraversalStrategy.DecorationStrategy, TraversalStrategy.FinalizationStrategy, TraversalStrategy.OptimizationStrategy, TraversalStrategy.ProviderOptimizationStrategy, TraversalStrategy.VerificationStrategy
STRATEGY
Modifier and Type | Method and Description |
---|---|
void |
apply(Traversal.Admin<?,?> traversal) |
static IdentityRemovalStrategy |
instance() |
equals, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
compareTo, getTraversalCategory
applyPost, applyPrior, getConfiguration
public void apply(Traversal.Admin<?,?> traversal)
apply
in interface TraversalStrategy<TraversalStrategy.OptimizationStrategy>
public static IdentityRemovalStrategy instance()
Copyright © 2013–2017 Apache Software Foundation. All rights reserved.