public static void addRequirements(final TraversalStrategies traversalStrategies, final TraverserRequirement... requirements) {
        RequirementsStrategy strategy = (RequirementsStrategy) traversalStrategies.getStrategy(RequirementsStrategy.class).orElse(null);
        if (null == strategy) {
            strategy = new RequirementsStrategy();
            traversalStrategies.addStrategies(strategy);
        } else {
            final RequirementsStrategy cloneStrategy = new RequirementsStrategy();
            cloneStrategy.requirements.addAll(strategy.requirements);
            strategy = cloneStrategy;
            traversalStrategies.addStrategies(strategy);
        }
        Collections.addAll(strategy.requirements, requirements);
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/RequirementsStrategy.java