V - the type of vertices on the edges.public class Edge<V extends Vertex> extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
private Collection<EdgeAttribute> |
attributes |
protected V |
destination |
protected String |
id |
protected V |
source |
protected Double |
weight |
| Constructor and Description |
|---|
Edge(String id)
A generic edge for a graph object.
|
Edge(String id,
V source,
V destination)
A generic edge for a graph object.
|
Edge(String id,
V source,
V destination,
Double weight)
A generic edge for a graph object.
|
Edge(V source,
V destination)
A generic edge for a graph object.
|
Edge(V source,
V destination,
Double weight)
A generic edge for a graph object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAttribute(EdgeAttribute attribute)
Add an attribute to the edge.
|
protected void |
finalize() |
EdgeAttribute |
getAttributeByName(String attributeName)
Obtain an attribute of this edge by the attributes name.
|
String |
toString() |
protected String id
protected Double weight
private Collection<EdgeAttribute> attributes
public Edge(String id)
id - an id for the edge.public Edge(String id, V source, V destination)
id - an id for the edge.source - the source of the edge.destination - the destination of the edge.public Edge(V source, V destination)
source - the source of the edge.destination - the destination of the edge.public Edge(V source, V destination, Double weight)
source - the source of the edge.destination - the destination of the edge.weight - the weight attached to the edge.public final EdgeAttribute getAttributeByName(String attributeName)
attributeName - the name of the attribute to be found.public final boolean addAttribute(EdgeAttribute attribute)
attribute - the attribute to be added.Copyright © 2015 University of Glasgow. All rights reserved.