Class CodeBlockVertex

  • All Implemented Interfaces:
    java.lang.Comparable<CodeBlockVertex>

    public class CodeBlockVertex
    extends java.lang.Object
    implements java.lang.Comparable<CodeBlockVertex>
    A class for representing a code block within a graph.
    • Constructor Detail

      • CodeBlockVertex

        public CodeBlockVertex​(CodeBlock codeBlock)
        Constructor.
        Parameters:
        codeBlock - the code block for this vertex
      • CodeBlockVertex

        public CodeBlockVertex​(java.lang.String name)
        A constructor that allows for the creation of dummy nodes. This is useful in graphs where multiple entry or exit points need to be parented by a single vertex.
        Parameters:
        name - the name of this vertex
    • Method Detail

      • getCodeBlock

        public CodeBlock getCodeBlock()
      • getName

        public java.lang.String getName()
      • isDummy

        public boolean isDummy()
        Returns true if this vertex is not backed by a code block.
        Returns:
        true if this vertex is not backed by a code block.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object