Skip to content

Instantly share code, notes, and snippets.

@digorithm
Created October 7, 2014 18:09
Show Gist options
  • Save digorithm/b907b2356e0345f4dd25 to your computer and use it in GitHub Desktop.
Save digorithm/b907b2356e0345f4dd25 to your computer and use it in GitHub Desktop.
package GraphModels;
/**
*
* @author rodrigo
*/
public class Vertex {
/* This Data Structure will be capable to represent a Vertex,
* which is a Node that will be used on a graph
*/
public String id;
public String name;
public boolean visited = false;
public Vertex(String id, String name) {
this.id = id;
this.name = name;
}
public String getId() {
return id;
}
public String getName() {
return name;
}
@Override
public String toString() {
return name;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment