Package org.onosproject.net.link
Class DefaultLinkDescription
- java.lang.Object
-
- org.onosproject.net.AbstractDescription
-
- org.onosproject.net.link.DefaultLinkDescription
-
- All Implemented Interfaces:
Annotated
,Description
,LinkDescription
public class DefaultLinkDescription extends AbstractDescription implements LinkDescription
Default implementation of immutable link description entity.
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
EXPECTED
static boolean
NOT_EXPECTED
-
Constructor Summary
Constructors Constructor Description DefaultLinkDescription(ConnectPoint src, ConnectPoint dst, Link.Type type, boolean isExpected, SparseAnnotations... annotations)
Creates a link description using the supplied information.DefaultLinkDescription(ConnectPoint src, ConnectPoint dst, Link.Type type, SparseAnnotations... annotations)
Creates a link description using the supplied information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectPoint
dst()
Returns the link destination.boolean
equals(java.lang.Object object)
int
hashCode()
boolean
isExpected()
Returns true if the link is expected, false otherwise.ConnectPoint
src()
Returns the link source.java.lang.String
toString()
Link.Type
type()
Returns the link type.-
Methods inherited from class org.onosproject.net.AbstractDescription
annotations
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.onosproject.net.Description
annotations
-
-
-
-
Field Detail
-
EXPECTED
public static final boolean EXPECTED
- See Also:
- Constant Field Values
-
NOT_EXPECTED
public static final boolean NOT_EXPECTED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultLinkDescription
public DefaultLinkDescription(ConnectPoint src, ConnectPoint dst, Link.Type type, boolean isExpected, SparseAnnotations... annotations)
Creates a link description using the supplied information.- Parameters:
src
- link sourcedst
- link destinationtype
- link typeisExpected
- is the link expected to be part of this configurationannotations
- optional key/value annotations
-
DefaultLinkDescription
public DefaultLinkDescription(ConnectPoint src, ConnectPoint dst, Link.Type type, SparseAnnotations... annotations)
Creates a link description using the supplied information.- Parameters:
src
- link sourcedst
- link destinationtype
- link typeannotations
- optional key/value annotations
-
-
Method Detail
-
src
public ConnectPoint src()
Description copied from interface:LinkDescription
Returns the link source.- Specified by:
src
in interfaceLinkDescription
- Returns:
- links source
-
dst
public ConnectPoint dst()
Description copied from interface:LinkDescription
Returns the link destination.- Specified by:
dst
in interfaceLinkDescription
- Returns:
- links destination
-
type
public Link.Type type()
Description copied from interface:LinkDescription
Returns the link type.- Specified by:
type
in interfaceLinkDescription
- Returns:
- link type
-
isExpected
public boolean isExpected()
Description copied from interface:LinkDescription
Returns true if the link is expected, false otherwise.- Specified by:
isExpected
in interfaceLinkDescription
- Returns:
- expected flag
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractDescription
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in classAbstractDescription
-
-