public final class UiLinkId
extends java.lang.Object
UiLink
s.Modifier and Type | Class and Description |
---|---|
static class |
UiLinkId.Direction
Designates the directionality of an underlying (uni-directional) link.
|
static class |
UiLinkId.Type
Designates the type of link the identifier represents.
|
Modifier and Type | Method and Description |
---|---|
ElementId |
elementA()
Returns the identifier of the first element.
|
ElementId |
elementB()
Returns the identifier of the second element.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
java.lang.String |
idA()
String representation of endpoint A.
|
java.lang.String |
idB()
String representation of endpoint B.
|
boolean |
isDeviceDevice()
Returns true if this identifier represents a device-device
(infrastructure) link.
|
boolean |
isHostDevice()
Returns true if this identifier represents a host-device (edge) link.
|
boolean |
isRegionDevice()
Returns true if this identifier represents a region-device link.
|
boolean |
isRegionRegion()
Returns true if this identifier represents a region-region link.
|
PortNumber |
portA()
Returns the port of the first element.
|
PortNumber |
portB()
Returns the port of the second element.
|
RegionId |
regionA()
Returns the identity of the first region.
|
RegionId |
regionB()
Returns the identity of the second region.
|
java.lang.String |
toString() |
UiLinkId.Type |
type()
Returns the type of link this identifier represents.
|
static UiLinkId |
uiLinkId(DeviceId a,
PortNumber pa,
DeviceId b,
PortNumber pb)
Generates an identifier for a link between two devices.
|
static UiLinkId |
uiLinkId(HostId h,
DeviceId d,
PortNumber p)
Generates an identifier for an edge link.
|
static UiLinkId |
uiLinkId(Link link)
Generates the canonical link identifier for the given link.
|
static UiLinkId |
uiLinkId(LinkKey lk)
Creates the canonical link identifier from the given link key.
|
static UiLinkId |
uiLinkId(RegionId regionId,
DeviceId deviceId,
PortNumber portNumber)
Generates the canonical link identifier for a link between the specified
region and device/port.
|
static UiLinkId |
uiLinkId(RegionId one,
RegionId two)
Generates the canonical link identifier for a link between the
specified region nodes.
|
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String idA()
public java.lang.String idB()
public ElementId elementA()
public PortNumber portA()
public ElementId elementB()
public PortNumber portB()
public RegionId regionA()
public RegionId regionB()
public UiLinkId.Type type()
public boolean isRegionRegion()
public boolean isRegionDevice()
public boolean isDeviceDevice()
public boolean isHostDevice()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static UiLinkId uiLinkId(Link link)
link
- link for which the identifier is requiredjava.lang.NullPointerException
- if src or dst connect point is nullpublic static UiLinkId uiLinkId(LinkKey lk)
lk
- link keyjava.lang.NullPointerException
- if src or dst connect point is nullpublic static UiLinkId uiLinkId(RegionId one, RegionId two)
one
- the first region IDtwo
- the second region IDjava.lang.NullPointerException
- if any of the required fields are nulljava.lang.IllegalArgumentException
- if the identifiers are identicalpublic static UiLinkId uiLinkId(RegionId regionId, DeviceId deviceId, PortNumber portNumber)
regionId
- region IDdeviceId
- device IDportNumber
- port numberjava.lang.NullPointerException
- if any of the required fields are nullpublic static UiLinkId uiLinkId(DeviceId a, PortNumber pa, DeviceId b, PortNumber pb)
a
- device Apa
- port Ab
- device Bpb
- port Bjava.lang.NullPointerException
- if any of the required fields are nullpublic static UiLinkId uiLinkId(HostId h, DeviceId d, PortNumber p)
h
- hostd
- devicep
- portjava.lang.NullPointerException
- if any of the required fields are null