}
@Override
public void apply(final Traversal traversal, final TraversalEngine traversalEngine) {
if (traversal.getSteps().get(0) instanceof Neo4jGraphStep) {
final Neo4jGraphStep neo4jGraphStep = (Neo4jGraphStep) traversal.getSteps().get(0);
Step currentStep = neo4jGraphStep.getNextStep();
while (true) {
if (currentStep == EmptyStep.instance() || TraversalHelper.isLabeled(currentStep)) break;
if (currentStep instanceof HasStep) {
neo4jGraphStep.hasContainers.addAll(((HasStep) currentStep).getHasContainers());