Class DepthFirstExpandCollection<N>

java.lang.Object
org.processmining.framework.util.search.DepthFirstExpandCollection<N>
All Implemented Interfaces:
ExpandCollection<N>
Direct Known Subclasses:
BreadthFirstExpandCollection

public class DepthFirstExpandCollection<N> extends Object implements ExpandCollection<N>
  • Field Details

    • stack

      protected Stack<N> stack
  • Constructor Details

    • DepthFirstExpandCollection

      public DepthFirstExpandCollection()
  • Method Details

    • add

      public void add(Collection<? extends N> newElements)
      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 interface ExpandCollection<N>
      Parameters:
      newElements - the nodes to expand further
    • pop

      public N 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 interface ExpandCollection<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 interface ExpandCollection<N>
      Returns: