Package graph

Klasse Vertex

java.lang.Object
graph.Vertex
Bekannte direkte Unterklassen:
MarkedVertex

public abstract class Vertex extends Object
Represents a vertex in a graph. This class serves as a base abstraction for vertices in various types of graphs.
  • Felddetails

  • Konstruktordetails

    • Vertex

      public Vertex()
      Constructs a vertex with an empty name.
    • Vertex

      public Vertex(String s)
      Constructs a vertex with a specified name.
      Parameter:
      s - The name of the vertex.
  • Methodendetails

    • getName

      public String getName()
      Retrieves the name of the vertex.
      Gibt zurück:
      The name of the vertex.
    • getScreenVertex

      public abstract Vertex getScreenVertex()
      Abstract method to retrieve the visualization representation of the vertex. Concrete subclasses will provide specific implementations.
      Gibt zurück:
      The visualization representation of the vertex.
    • setName

      public void setName(String s)
      Sets the name of the vertex.
      Parameter:
      s - The new name for the vertex.