package net.xprova.netlistgraph;

public class Vertex {

	public String name, subtype;

	public VertexType type;

	public Vertex(String name, VertexType type, String subtype) {

		this.name = name;

		this.type = type;

		this.subtype = subtype;

	}

	public Vertex(Vertex v) {

		this.name = v.name;

		this.type = v.type;

		this.subtype = v.subtype;

	}
	
	public Vertex() {
		
		this.name  = "n/a";
		
		this.type  = VertexType.NET;
		
		this.subtype  = "n/a";
		
	}

	@Override
	public String toString() {
		
		return name;

	}

}

@@ -47,16 +47,45 @@
  Vertex 
+implements Comparable%3CVertex%3E
 %7B%0A%0A%09publ
@@ -379,18 +379,17 @@
 pe;%0A%0A%09%7D%0A
-%09
 %0A
+
 %09public 
@@ -399,19 +399,17 @@
 tex() %7B%0A
-%09%09
 %0A
+
 %09%09this.n
@@ -422,19 +422,17 @@
  %22n/a%22;%0A
-%09%09
 %0A
+
 %09%09this.t
@@ -454,19 +454,17 @@
 pe.NET;%0A
-%09%09
 %0A
+
 %09%09this.s
@@ -480,19 +480,17 @@
  %22n/a%22;%0A
-%09%09
 %0A
+
 %09%7D%0A%0A%09@Ov
@@ -524,18 +524,16 @@
 ing() %7B%0A
-%09%09
 %0A%09%09retur
@@ -545,10 +545,103 @@
 e;%0A%0A%09%7D%0A%0A
+%09@Override%0A%09public int compareTo(Vertex other) %7B%0A%0A%09%09return name.compareTo(other.name);%0A%0A%0A%09%7D%0A%0A
 %7D%0A

Make Vertex comparable