public class DefaultPort extends AbstractAnnotated implements Port
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_SPEED
Default port speed in Mbps.
|
| Constructor and Description |
|---|
DefaultPort(Element element,
PortNumber number,
boolean isEnabled,
Annotations... annotations)
Creates a network element attributed to the specified provider.
|
DefaultPort(Element element,
PortNumber number,
boolean isEnabled,
Port.Type type,
long portSpeed,
Annotations... annotations)
Creates a network element attributed to the specified provider.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
java.lang.String |
toString() |
Port.Type |
type()
Returns the port type.
|
annotationsclone, finalize, getClass, notify, notifyAll, wait, wait, waitannotationspublic static final long DEFAULT_SPEED
public DefaultPort(Element element, PortNumber number, boolean isEnabled, Annotations... annotations)
element - parent network elementnumber - port numberisEnabled - indicator whether the port is up and activeannotations - optional key/value annotationspublic DefaultPort(Element element, PortNumber number, boolean isEnabled, Port.Type type, long portSpeed, Annotations... annotations)
element - parent network elementnumber - port numberisEnabled - indicator whether the port is up and activetype - port typeportSpeed - port speed in Mbsannotations - optional key/value annotationspublic Element element()
Portpublic PortNumber number()
Portpublic boolean isEnabled()
Portpublic long portSpeed()
Portpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object