public class Edge extends java.lang.Object implements IEdge
IEdge
interface.Constructor and Description |
---|
Edge(java.lang.Comparable nodeFrom,
java.lang.Comparable nodeTo) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o)
Compares this edge to the given one using
the
nodes first. |
boolean |
equals(java.lang.Object obj) |
java.lang.Object |
getFrom()
Get the node this edge originates from.
|
java.lang.Object |
getTo()
Get the node this edge points to.
|
int |
hashCode() |
java.lang.String |
toString() |
public Edge(java.lang.Comparable nodeFrom, java.lang.Comparable nodeTo)
nodeFrom
- nodeTo
- public java.lang.Object getFrom()
IEdge
public java.lang.Object getTo()
IEdge
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(java.lang.Object o)
getFrom()
nodes first.
If those are equal the getTo()
}
is used for comparison.compareTo
in interface java.lang.Comparable
Comparable.compareTo(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2002-2020. All Rights Reserved.