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 booleanEXPECTEDstatic booleanNOT_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 ConnectPointdst()Returns the link destination.booleanequals(java.lang.Object object)inthashCode()booleanisExpected()Returns true if the link is expected, false otherwise.ConnectPointsrc()Returns the link source.java.lang.StringtoString()Link.Typetype()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:LinkDescriptionReturns the link source.- Specified by:
srcin interfaceLinkDescription- Returns:
- links source
-
dst
public ConnectPoint dst()
Description copied from interface:LinkDescriptionReturns the link destination.- Specified by:
dstin interfaceLinkDescription- Returns:
- links destination
-
type
public Link.Type type()
Description copied from interface:LinkDescriptionReturns the link type.- Specified by:
typein interfaceLinkDescription- Returns:
- link type
-
isExpected
public boolean isExpected()
Description copied from interface:LinkDescriptionReturns true if the link is expected, false otherwise.- Specified by:
isExpectedin interfaceLinkDescription- Returns:
- expected flag
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractDescription
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classAbstractDescription
-
-