@Override
    @SuppressWarnings({"unchecked", "varargs"})
    public TraversalStrategies addStrategies(final TraversalStrategy<?>... strategies) {
        for (final TraversalStrategy<?> addStrategy : strategies) {
            // search by class to prevent strategies from being added more than once
            getStrategy(addStrategy.getClass()).ifPresent(s -> this.traversalStrategies.remove(s));
        }
        Collections.addAll(this.traversalStrategies, strategies);
        this.traversalStrategies = TraversalStrategies.sortStrategies(this.traversalStrategies);
        return this;
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversalStrategies.java