Package org.onosproject.net.topology
Class DefaultTopologyEdge
- java.lang.Object
-
- org.onosproject.net.topology.DefaultTopologyEdge
-
- All Implemented Interfaces:
Edge<TopologyVertex>
,TopologyEdge
public class DefaultTopologyEdge extends java.lang.Object implements TopologyEdge
Implementation of the topology edge backed by a link.
-
-
Constructor Summary
Constructors Constructor Description DefaultTopologyEdge(TopologyVertex src, TopologyVertex dst, Link link)
Creates a new topology edge.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TopologyVertex
dst()
Returns the edge destination vertex.boolean
equals(java.lang.Object obj)
int
hashCode()
Link
link()
Returns the associated infrastructure link.TopologyVertex
src()
Returns the edge source vertex.java.lang.String
toString()
-
-
-
Constructor Detail
-
DefaultTopologyEdge
public DefaultTopologyEdge(TopologyVertex src, TopologyVertex dst, Link link)
Creates a new topology edge.- Parameters:
src
- source vertexdst
- destination vertexlink
- infrastructure link
-
-
Method Detail
-
link
public Link link()
Description copied from interface:TopologyEdge
Returns the associated infrastructure link.- Specified by:
link
in interfaceTopologyEdge
- Returns:
- backing infrastructure link
-
src
public TopologyVertex src()
Description copied from interface:Edge
Returns the edge source vertex.- Specified by:
src
in interfaceEdge<TopologyVertex>
- Returns:
- source vertex
-
dst
public TopologyVertex dst()
Description copied from interface:Edge
Returns the edge destination vertex.- Specified by:
dst
in interfaceEdge<TopologyVertex>
- Returns:
- destination vertex
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-