* @return the extended Pipeline
*/
public GremlinPipeline<S, Edge> bothE(final int branchFactor, final String... labels) {
return this.doQueryOptimization ?
this.add(new VertexQueryPipe(Edge.class, Direction.BOTH, null, null, branchFactor, 0, Integer.MAX_VALUE, labels)) :
this.add(new BothEdgesPipe(branchFactor, labels));
}