public class DefaultPortDescription extends AbstractDescription implements PortDescription
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultPortDescription.Builder |
| 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.Builder |
builder()
Creates port description builder with default parameters.
|
static DefaultPortDescription.Builder |
builder(PortDescription desc)
Creates port description builder inheriting with default parameters,
from specified port description.
|
static DefaultPortDescription |
copyReplacingAnnotation(PortDescription base,
SparseAnnotations annotations)
Creates a port description using the supplied information.
|
boolean |
equals(java.lang.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.
|
java.lang.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 java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class AbstractDescriptionpublic boolean equals(java.lang.Object object)
equals in class AbstractDescriptionpublic static DefaultPortDescription.Builder builder()
public static DefaultPortDescription.Builder builder(PortDescription desc)
desc - to inherit default from