|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectGraph.Edge
public abstract class Edge
This abstract class specifies a generic edge. Each edge has an id, a source and a target. It also has a weight function, which is left unspecified, to be determined by later implementations.
| Field Summary | |
|---|---|
protected int |
id
The unique id of the edge |
protected int |
source
The source node of the edge |
protected int |
target
The target node of the edge |
| Constructor Summary | |
|---|---|
Edge(Edge e)
Copy Constructor. |
|
Edge(int source,
int target)
Constructor with no id. |
|
Edge(int source,
int target,
int id)
Constructor with id. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Returns true if two edge objects are equal. |
int |
id()
Return the edge's id |
int |
source()
Returns the source node of the edge |
int |
target()
Returns the target node of the edge |
java.lang.String |
toString()
String representation |
abstract double |
weight()
Returns the weight of the edge |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int id
protected int source
protected int target
| Constructor Detail |
|---|
public Edge(int source,
int target)
public Edge(int source,
int target,
int id)
public Edge(Edge e)
| Method Detail |
|---|
public int id()
public int source()
public int target()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic abstract double weight()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||