Package org.onosproject.net.behaviour
Class DefaultPatchDescription
- java.lang.Object
-
- org.onosproject.net.AbstractDescription
-
- org.onosproject.net.behaviour.DefaultPatchDescription
-
- All Implemented Interfaces:
Annotated
,PatchDescription
,Description
public final class DefaultPatchDescription extends AbstractDescription implements PatchDescription
Default implementation of immutable patch interface description entity.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultPatchDescription.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultPatchDescription.Builder
builder()
Returns new builder instance.java.util.Optional<java.lang.String>
deviceId()
Returns the identifier of the device where this patch interface is.boolean
equals(java.lang.Object obj)
int
hashCode()
java.lang.String
ifaceName()
Return the name of the patch interface.java.lang.String
peer()
Returns the name of the interface for the other side of the patch.java.lang.String
toString()
-
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
-
-
-
-
Method Detail
-
deviceId
public java.util.Optional<java.lang.String> deviceId()
Description copied from interface:PatchDescription
Returns the identifier of the device where this patch interface is.- Specified by:
deviceId
in interfacePatchDescription
- Returns:
- device identifier; empty value if not set
-
ifaceName
public java.lang.String ifaceName()
Description copied from interface:PatchDescription
Return the name of the patch interface.- Specified by:
ifaceName
in interfacePatchDescription
- Returns:
- patch interface name
-
peer
public java.lang.String peer()
Description copied from interface:PatchDescription
Returns the name of the interface for the other side of the patch.- Specified by:
peer
in interfacePatchDescription
- Returns:
- peer patch interface name
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractDescription
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classAbstractDescription
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
builder
public static DefaultPatchDescription.Builder builder()
Returns new builder instance.- Returns:
- default patch description builder
-
-