public class DefaultPortDescription extends AbstractDescription implements PortDescription
| Modifier | Constructor and Description |
|---|---|
protected |
DefaultPortDescription() |
|
DefaultPortDescription(PortDescription base,
SparseAnnotations annotations)
Creates a port description using the supplied information.
|
|
DefaultPortDescription(PortNumber number,
boolean isEnabled,
boolean isRemoved,
Port.Type type,
long portSpeed,
SparseAnnotations... annotations)
Creates a port description using the supplied information.
|
|
DefaultPortDescription(PortNumber number,
boolean isEnabled,
Port.Type type,
long portSpeed,
SparseAnnotations... annotations)
Creates a port description using the supplied information.
|
|
DefaultPortDescription(PortNumber number,
boolean isEnabled,
SparseAnnotations... annotations)
Creates a DEFAULT_SPEED COPPER port description using the supplied information.
|
| Modifier and Type | Method and Description |
|---|---|
static DefaultPortDescription |
copyReplacingAnnotation(PortDescription base,
SparseAnnotations annotations)
Creates a port description using the supplied information.
|
boolean |
equals(Object object) |
int |
hashCode() |
boolean |
isEnabled()
Indicates whether or not the port is up and active.
|
boolean |
isRemoved()
Indicates whether or not the port was removed.
|
PortNumber |
portNumber()
Returns the port number.
|
long |
portSpeed()
Returns the current port speed in Mbps.
|
String |
toString() |
Port.Type |
type()
Returns the port type.
|
annotationsclone, finalize, getClass, notify, notifyAll, wait, wait, waitannotationspublic DefaultPortDescription(PortNumber number, boolean isEnabled, SparseAnnotations... annotations)
number - port numberisEnabled - port enabled stateannotations - optional key/value annotations mappublic DefaultPortDescription(PortNumber number, boolean isEnabled, Port.Type type, long portSpeed, SparseAnnotations... annotations)
number - port numberisEnabled - port enabled statetype - port typeportSpeed - port speed in Mbpsannotations - optional key/value annotations mappublic DefaultPortDescription(PortNumber number, boolean isEnabled, boolean isRemoved, Port.Type type, long portSpeed, SparseAnnotations... annotations)
number - port numberisEnabled - port enabled stateisRemoved - port removed statetype - port typeportSpeed - port speed in Mbpsannotations - optional key/value annotations mapprotected DefaultPortDescription()
public DefaultPortDescription(PortDescription base, SparseAnnotations annotations)
base - PortDescription to get basic information fromannotations - optional key/value annotations mappublic static DefaultPortDescription copyReplacingAnnotation(PortDescription base, SparseAnnotations annotations)
base - port description to copy fields fromannotations - to be used in the copied description.
Note: Annotations on base will be ignored.public PortNumber portNumber()
PortDescriptionportNumber in interface PortDescriptionpublic boolean isEnabled()
PortDescriptionisEnabled in interface PortDescriptionpublic boolean isRemoved()
PortDescriptionisRemoved in interface PortDescriptionpublic Port.Type type()
PortDescriptiontype in interface PortDescriptionpublic long portSpeed()
PortDescriptionportSpeed in interface PortDescriptionpublic int hashCode()
hashCode in class AbstractDescriptionpublic boolean equals(Object object)
equals in class AbstractDescription