Package org.onosproject.net.device
Class DefaultPortDescription.Builder
- java.lang.Object
-
- org.onosproject.net.device.DefaultPortDescription.Builder
-
- Enclosing class:
- DefaultPortDescription
public static class DefaultPortDescription.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultPortDescription.Builder
annotations(SparseAnnotations annotations)
Sets annotations.DefaultPortDescription
build()
Builds the port description.DefaultPortDescription.Builder
isEnabled(boolean enabled)
Sets enabled state.DefaultPortDescription.Builder
isRemoved(boolean removed)
Sets removed state.DefaultPortDescription.Builder
portSpeed(long mbps)
Sets port speed.DefaultPortDescription.Builder
type(Port.Type type)
Sets port type.DefaultPortDescription.Builder
withPortNumber(PortNumber number)
Sets mandatory field PortNumber.
-
-
-
Method Detail
-
withPortNumber
public DefaultPortDescription.Builder withPortNumber(PortNumber number)
Sets mandatory field PortNumber.- Parameters:
number
- to set- Returns:
- self
-
isEnabled
public DefaultPortDescription.Builder isEnabled(boolean enabled)
Sets enabled state.- Parameters:
enabled
- state- Returns:
- self
-
isRemoved
public DefaultPortDescription.Builder isRemoved(boolean removed)
Sets removed state.- Parameters:
removed
- state- Returns:
- self
-
type
public DefaultPortDescription.Builder type(Port.Type type)
Sets port type.- Parameters:
type
- of the port- Returns:
- self
-
portSpeed
public DefaultPortDescription.Builder portSpeed(long mbps)
Sets port speed.- Parameters:
mbps
- port speed in Mbps- Returns:
- self
-
annotations
public DefaultPortDescription.Builder annotations(SparseAnnotations annotations)
Sets annotations.- Parameters:
annotations
- of the port- Returns:
- self
-
build
public DefaultPortDescription build()
Builds the port description.- Returns:
- port description
-
-