Class DepthFirstExpandCollection<N>
java.lang.Object
org.processmining.framework.util.search.DepthFirstExpandCollection<N>
- All Implemented Interfaces:
ExpandCollection<N>
- Direct Known Subclasses:
BreadthFirstExpandCollection
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(Collection<? extends N> newElements) Adds the given elements to the collection.boolean
isEmpty()
Checks whether or not the collection retained by this ExpandCollection is empty.pop()
Gets and removes the first element to be expanded by the node expander.
-
Field Details
-
stack
-
-
Constructor Details
-
DepthFirstExpandCollection
public DepthFirstExpandCollection()
-
-
Method Details
-
add
Description copied from interface:ExpandCollection
Adds the given elements to the collection. Note that implementing classes may safely assume that the calling thread owns the monitor, i.e. there is no need to synchronize on the collection retained by this expandcollection and removals are allowed. Furthermore, the implementing class may decide not to include any of the given newElements if it decides that they are not to be investigated further.- Specified by:
add
in interfaceExpandCollection<N>
- Parameters:
newElements
- the nodes to expand further
-
pop
Description copied from interface:ExpandCollection
Gets and removes the first element to be expanded by the node expander. Implementing classes may assume that isEmpty() returns false before any call to pop, i.e. the first line of the implementation can be:assert (!isEmpty())
- Specified by:
pop
in interfaceExpandCollection<N>
- Returns:
- the first element to be investigated by the searcher.
-
isEmpty
public boolean isEmpty()Description copied from interface:ExpandCollection
Checks whether or not the collection retained by this ExpandCollection is empty. If this method returns false, a call to pop() can be made.- Specified by:
isEmpty
in interfaceExpandCollection<N>
- Returns:
-