Package org.opendaylight.graph.impl
Class ConnectedEdgeImpl
- java.lang.Object
-
- org.opendaylight.graph.impl.ConnectedEdgeImpl
-
- All Implemented Interfaces:
ConnectedEdge
public class ConnectedEdgeImpl extends Object implements ConnectedEdge
This Class implements the Connected Edge used by the Connected Graph for path computation algorithms.- Author:
- Olivier Dugeon, Philippe Niger
-
-
Constructor Summary
Constructors Constructor Description ConnectedEdgeImpl(@NonNull Long key)ConnectedEdgeImpl(@NonNull Edge edge)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisconnect()Disconnect both source and destination Connected Vertices.voiddisconnectDestination()Disconnect destination Connected Vertex.voiddisconnectSource()Disconnect source Connected Vertex.ConnectedVertexgetDestination()Returns the destination Connected Vertex from the Connected Graph associated to this Connected Edge.EdgegetEdge()Returns the Edge from the Graph associated to this connection.@NonNull LonggetKey()Returns unique key associated to this Connected Edge.ConnectedVertexgetSource()Returns the source Connected Vertex from the Connected Graph associated to this Connected Edge.ConnectedEdgeImplsetDestination(ConnectedVertexImpl vertex)Set Connected Vertex as destination.ConnectedEdgeImplsetEdge(Edge edge)Set associated Edge to this Connected Edge.ConnectedEdgeImplsetSource(ConnectedVertexImpl vertex)Set Connected Vertex as source.StringtoString()Returns the name of the associated Edge if set or the interface address otherwise.
-
-
-
Method Detail
-
setSource
public ConnectedEdgeImpl setSource(ConnectedVertexImpl vertex)
Set Connected Vertex as source.- Parameters:
vertex- Vertex
-
setDestination
public ConnectedEdgeImpl setDestination(ConnectedVertexImpl vertex)
Set Connected Vertex as destination.- Parameters:
vertex- Vertex
-
disconnectSource
public void disconnectSource()
Disconnect source Connected Vertex.
-
disconnectDestination
public void disconnectDestination()
Disconnect destination Connected Vertex.
-
disconnect
public void disconnect()
Disconnect both source and destination Connected Vertices.
-
setEdge
public ConnectedEdgeImpl setEdge(Edge edge)
Set associated Edge to this Connected Edge.- Parameters:
edge- Edge
-
getKey
public @NonNull Long getKey()
Description copied from interface:ConnectedEdgeReturns unique key associated to this Connected Edge.- Specified by:
getKeyin interfaceConnectedEdge- Returns:
- Edge Key
-
getSource
public ConnectedVertex getSource()
Description copied from interface:ConnectedEdgeReturns the source Connected Vertex from the Connected Graph associated to this Connected Edge.- Specified by:
getSourcein interfaceConnectedEdge- Returns:
- Source Connected Vertex
-
getDestination
public ConnectedVertex getDestination()
Description copied from interface:ConnectedEdgeReturns the destination Connected Vertex from the Connected Graph associated to this Connected Edge.- Specified by:
getDestinationin interfaceConnectedEdge- Returns:
- Destination Connected Vertex
-
getEdge
public Edge getEdge()
Description copied from interface:ConnectedEdgeReturns the Edge from the Graph associated to this connection.- Specified by:
getEdgein interfaceConnectedEdge- Returns:
- Edge associated to this connection
-
-