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.
|
annotations
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
annotations
public 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()
PortDescription
portNumber
in interface PortDescription
public boolean isEnabled()
PortDescription
isEnabled
in interface PortDescription
public boolean isRemoved()
PortDescription
isRemoved
in interface PortDescription
public Port.Type type()
PortDescription
type
in interface PortDescription
public long portSpeed()
PortDescription
portSpeed
in interface PortDescription
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class AbstractDescription
public boolean equals(java.lang.Object object)
equals
in class AbstractDescription
public static DefaultPortDescription.Builder builder()
public static DefaultPortDescription.Builder builder(PortDescription desc)
desc
- to inherit default from