Class DepthFirstConceptIterator

  • All Implemented Interfaces:
    Iterable<SAbstractConcept>, Iterator<SAbstractConcept>

    public class DepthFirstConceptIterator
    extends Object
    implements Iterable<SAbstractConcept>, Iterator<SAbstractConcept>
    Traverse hierarchy of SConcepts for a given concept (inclusive), visiting super-concepts first then super-interfaces in an order they were specified in super-concepts (breadth-like). FIXME make it truly breadth-first, for interface concepts as well. Given ConceptA implements I1, I2 and ConceptB extends ConceptA implements I3, I4, interface I3 extends I5, interface I5 extends I1, and ConceptB as starting point, the order would be ConceptB, ConceptA, I3, I4, I1, I2, I5, I1 Note, same concept may appear few times in this iterator, no unique filtering is done. Use UniqueIterator if necessary. FIXME functionality of this class shall get exposed from SConcept API (likely, in addition to public iterator not to limit to single iteration approach, i.e. depth or breadth first).