Class Element

  • All Implemented Interfaces:
    ElementSet, Iterable<Element>
    Direct Known Subclasses:
    SinkNode, SourceNode

    public abstract class Element
    extends Expression
    implements ElementSet
    Expression that represents an alphabet of a regular language.

    Since this package is about a regular expression over element declarations, this represents an XML element declaration (hence the name.) Element needs to be interned, meaning one Element per one tag name.

    Implements ElementSet to represent a self.

    Author:
    Kohsuke Kawaguchi
    • Constructor Detail

      • Element

        protected Element()
    • Method Detail

      • addNext

        public void addNext​(Element element)
        Description copied from interface: ElementSet
        For each element in this set, adds an edge to the given element.
        Specified by:
        addNext in interface ElementSet
      • contains

        public boolean contains​(ElementSet rhs)
        Description copied from interface: ElementSet
        Doesn't have to be strict (it's OK for this method to return false when it's actually true) since this is used just for optimization. (Erring on the other side is NG)
        Specified by:
        contains in interface ElementSet
      • buildStronglyConnectedComponents

        public void buildStronglyConnectedComponents​(List<ConnectedComponent> ccs)
        Builds a set of strongly connected components and puts them all into the given set.
      • hasSelfLoop

        public boolean hasSelfLoop()