java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.strategy.AbstractTraversalStrategy<TraversalStrategy.OptimizationStrategy>
org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IncidentToAdjacentStrategy
All Implemented Interfaces:
Serializable, Comparable<Class<? extends TraversalStrategy>>, TraversalStrategy<TraversalStrategy.OptimizationStrategy>, TraversalStrategy.OptimizationStrategy

public final class IncidentToAdjacentStrategy extends AbstractTraversalStrategy<TraversalStrategy.OptimizationStrategy> implements TraversalStrategy.OptimizationStrategy
This strategy looks for .outE().inV(), .inE().outV() and .bothE().otherV() and replaces these step sequences with .out(), .in() or .both() respectively. The strategy won't modify the traversal if:

  • the edge step is labeled
  • the traversal contains a path step
  • the traversal contains a lambda step

By re-writing the traversal in this fashion, the traversal eliminates unnecessary steps and becomes more normalized.

Author:
Daniel Kuppitz (http://gremlin.guru)
See Also:
Example:
 __.outE().inV()         // is replaced by __.out()
 __.inE().outV()         // is replaced by __.in()
 __.bothE().otherV()     // is replaced by __.both()
 __.bothE().bothV()      // will not be modified
 __.outE().inV().path()  // will not be modified
 __.outE().inV().tree()  // will not be modified