Package org.onosproject.net.utils
Class ForwardingPort
- java.lang.Object
-
- org.onosproject.net.utils.ForwardingPort
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForwardingPort(Port delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Annotations
annotations()
Returns the key/value annotations.Element
element()
Returns the parent network element to which this port belongs.boolean
equals(java.lang.Object obj)
int
hashCode()
boolean
isEnabled()
Indicates whether or not the port is currently up and active.PortNumber
number()
Returns the port number.long
portSpeed()
Returns the current port speed in Mbps.protected org.apache.commons.lang3.builder.EqualsBuilder
toEqualsBuilder(Port that)
ReturnsEqualsBuilder
comparing all Port attributes including annotations.java.lang.String
toString()
protected com.google.common.base.MoreObjects.ToStringHelper
toStringHelper()
ReturnsMoreObjects.ToStringHelper
with Port attributes excluding annotations.Port.Type
type()
Returns the port type.
-
-
-
Constructor Detail
-
ForwardingPort
protected ForwardingPort(Port delegate)
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toEqualsBuilder
protected org.apache.commons.lang3.builder.EqualsBuilder toEqualsBuilder(Port that)
ReturnsEqualsBuilder
comparing all Port attributes including annotations.To add extra fields to equality, call
super.toEqualsBuilder(..)
and append fields. To remove field from comparison, override this method or manually implement equals().- Parameters:
that
- object to compare to- Returns:
- builder object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toStringHelper
protected com.google.common.base.MoreObjects.ToStringHelper toStringHelper()
ReturnsMoreObjects.ToStringHelper
with Port attributes excluding annotations.- Returns:
MoreObjects.ToStringHelper
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
annotations
public Annotations annotations()
Description copied from interface:Annotated
Returns the key/value annotations.- Specified by:
annotations
in interfaceAnnotated
- Returns:
- key/value annotations
-
element
public Element element()
Description copied from interface:Port
Returns the parent network element to which this port belongs.
-
number
public PortNumber number()
Description copied from interface:Port
Returns the port number.
-
isEnabled
public boolean isEnabled()
Description copied from interface:Port
Indicates whether or not the port is currently up and active.
-
-