T - The type of event this graph has for edge labelspublic class Vertex<T extends Event>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
m_id
The ID of this vertex
|
protected java.util.Set<Edge<T>> |
m_outEdges
The set of edges in this graph
|
| Constructor and Description |
|---|
Vertex(int id)
Creates an empty vertex with given ID
|
Vertex(Vertex<T> v)
Creates a copy of a vertex
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Edge<T> e)
Adds an outgoing edge to this vertex
|
boolean |
equals(java.lang.Object o) |
java.util.Set<Edge<T>> |
getEdges()
Gets the outgoing edges from this vertex
|
int |
getId()
Gets this vertex's ID
|
int |
hashCode() |
boolean |
isLeaf()
Determines if a vertex is a left, i.e.
|
java.lang.String |
toString() |
public int getId()
public void add(Edge<T> e)
e - The Edge (must play in U2)public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.util.Set<Edge<T>> getEdges()
public boolean isLeaf()
Copyright © Sylvain HallĂ©. All Rights Reserved.