Package org.onosproject.net
Class LinkKey
- java.lang.Object
-
- org.onosproject.net.LinkKey
-
public final class LinkKey extends Object
Immutable representation of a link identity.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
asId()
Returns a string suitable to be used as an identifier.ConnectPoint
dst()
Returns destination connection point.boolean
equals(Object obj)
int
hashCode()
static LinkKey
linkKey(ConnectPoint src, ConnectPoint dst)
Creates a link identifier with source and destination connection point.static LinkKey
linkKey(Link link)
Creates a link identifier for the specified link.static LinkKey
linkKey(LinkDescription link)
Creates a link identifier for the specified link.ConnectPoint
src()
Returns source connection point.String
toString()
-
-
-
Method Detail
-
src
public ConnectPoint src()
Returns source connection point.- Returns:
- source connection point
-
dst
public ConnectPoint dst()
Returns destination connection point.- Returns:
- destination connection point
-
asId
public String asId()
Returns a string suitable to be used as an identifier.- Returns:
- string as identifier
-
linkKey
public static LinkKey linkKey(ConnectPoint src, ConnectPoint dst)
Creates a link identifier with source and destination connection point.- Parameters:
src
- source connection pointdst
- destination connection point- Returns:
- a link identifier
-
linkKey
public static LinkKey linkKey(Link link)
Creates a link identifier for the specified link.- Parameters:
link
- link descriptor- Returns:
- a link identifier
-
linkKey
public static LinkKey linkKey(LinkDescription link)
Creates a link identifier for the specified link.- Parameters:
link
-Description
- Returns:
- a link identifier
-
-