Class Descendants

java.lang.Object
com.persequor.extension.eventservice.Descendants

public class Descendants extends Object
This class represents a tree/hierarchy structure of Epcs.
  • Constructor Details

  • Method Details

    • getDescendants

      public DescendantsList getDescendants()
    • getEpc

      public String getEpc()
      Returns an EPC of a container if this instance represents a container, Returns an EPC of an item if this instance represents an item. Returns an EPC class if this instance represents a quantity element
      Returns:
      EPC of a container or an item inside a container or an EPC class of a quantity element
    • getQuantityElement

      public Optional<QuantityElement> getQuantityElement()
    • getSagaEventIds

      public List<UUID> getSagaEventIds()
    • getLeafEpcs

      public Collection<String> getLeafEpcs()
      In case if leafs are representing quantity elements EPC class will be included into the result.
      Returns:
      EPCs or EPC classes of the leaf nodes
    • getLeafNodes

      public Collection<Descendants> getLeafNodes()
    • getAllNonLeafEpcs

      public Collection<String> getAllNonLeafEpcs()
    • getAncestor

      public Descendants getAncestor()
    • visit

      public void visit(BiConsumer<Descendants,Integer> visitor)
      Visit each node in the tree structure
      Parameters:
      visitor - the visitor accepting: node and depth