public class DefaultTraversalStrategies extends Object implements TraversalStrategies
TraversalStrategies.GlobalCache
Modifier and Type | Field and Description |
---|---|
protected Set<TraversalStrategy<?>> |
traversalStrategies |
STRATEGY_CATEGORIES
Constructor and Description |
---|
DefaultTraversalStrategies() |
Modifier and Type | Method and Description |
---|---|
TraversalStrategies |
addStrategies(TraversalStrategy<?>... strategies)
Add all the provided
TraversalStrategy instances to the current collection. |
DefaultTraversalStrategies |
clone() |
<T extends TraversalStrategy> |
getStrategy(Class<T> traversalStrategyClass)
Return the
TraversalStrategy instance associated with the provided class. |
Iterator<TraversalStrategy<?>> |
iterator()
Return an
Iterator of the TraversalStrategy instances. |
TraversalStrategies |
removeStrategies(Class<? extends TraversalStrategy>... strategyClasses)
Remove all the provided
TraversalStrategy classes from the current collection. |
List<TraversalStrategy<?>> |
toList()
Return an immutable list of the
TraversalStrategy instances. |
String |
toString() |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
sortStrategies, visit
forEach, spliterator
protected Set<TraversalStrategy<?>> traversalStrategies
public TraversalStrategies addStrategies(TraversalStrategy<?>... strategies)
TraversalStrategies
TraversalStrategy
instances 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.addStrategies
in interface TraversalStrategies
strategies
- the traversal strategies to addpublic TraversalStrategies removeStrategies(Class<? extends TraversalStrategy>... strategyClasses)
TraversalStrategies
TraversalStrategy
classes from the current collection.
When all the provided strategies have been removed, the collection is resorted.removeStrategies
in interface TraversalStrategies
strategyClasses
- the traversal strategies to remove by their classpublic List<TraversalStrategy<?>> toList()
TraversalStrategies
TraversalStrategy
instances.toList
in interface TraversalStrategies
public Iterator<TraversalStrategy<?>> iterator()
TraversalStrategies
Iterator
of the TraversalStrategy
instances.iterator
in interface Iterable<TraversalStrategy<?>>
iterator
in interface TraversalStrategies
public <T extends TraversalStrategy> Optional<T> getStrategy(Class<T> traversalStrategyClass)
TraversalStrategies
TraversalStrategy
instance associated with the provided class.getStrategy
in interface TraversalStrategies
T
- the strategy class typetraversalStrategyClass
- the class of the strategy to getpublic DefaultTraversalStrategies clone()
clone
in interface TraversalStrategies
clone
in class Object
Copyright © 2013–2021 Apache Software Foundation. All rights reserved.