Class DefaultTraversalStrategies
java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalStrategies
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<TraversalStrategy<?>>,TraversalStrategies
- Author:
- Marko A. Rodriguez (http://markorodriguez.com)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies
TraversalStrategies.GlobalCache -
Field Summary
FieldsFields inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies
STRATEGY_CATEGORIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddStrategies(TraversalStrategy<?>... strategies) Add all the providedTraversalStrategyinstances to the current collection.clone()<T extends TraversalStrategy>
Optional<T>getStrategy(Class<T> traversalStrategyClass) Return theTraversalStrategyinstance associated with the provided class.iterator()Return anIteratorof theTraversalStrategyinstances.removeStrategies(Class<? extends TraversalStrategy>... strategyClasses) Remove all the providedTraversalStrategyclasses from the current collection.toList()Return an immutable list of theTraversalStrategyinstances.toString()Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
traversalStrategies
-
-
Constructor Details
-
DefaultTraversalStrategies
public DefaultTraversalStrategies()
-
-
Method Details
-
addStrategies
Description copied from interface:TraversalStrategiesAdd all the providedTraversalStrategyinstances to the current collection. When all the provided strategies have been added, the collection is resorted. If a strategy class is found to already be defined, it is removed and replaced by the newly added one.- Specified by:
addStrategiesin interfaceTraversalStrategies- Parameters:
strategies- the traversal strategies to add- Returns:
- the newly updated/sorted traversal strategies collection
-
removeStrategies
Description copied from interface:TraversalStrategiesRemove all the providedTraversalStrategyclasses from the current collection. When all the provided strategies have been removed, the collection is resorted.- Specified by:
removeStrategiesin interfaceTraversalStrategies- Parameters:
strategyClasses- the traversal strategies to remove by their class- Returns:
- the newly updated/sorted traversal strategies collection
-
toList
Description copied from interface:TraversalStrategiesReturn an immutable list of theTraversalStrategyinstances.- Specified by:
toListin interfaceTraversalStrategies
-
iterator
Description copied from interface:TraversalStrategiesReturn anIteratorof theTraversalStrategyinstances.- Specified by:
iteratorin interfaceIterable<TraversalStrategy<?>>- Specified by:
iteratorin interfaceTraversalStrategies
-
getStrategy
Description copied from interface:TraversalStrategiesReturn theTraversalStrategyinstance associated with the provided class.- Specified by:
getStrategyin interfaceTraversalStrategies- Type Parameters:
T- the strategy class type- Parameters:
traversalStrategyClass- the class of the strategy to get- Returns:
- an optional containing the strategy instance or not
-
clone
- Specified by:
clonein interfaceTraversalStrategies- Overrides:
clonein classObject
-
toString
-