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(Object o) |
int |
hashCode() |
String |
idA()
String representation of endpoint A.
|
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.
|
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 String idA()
public 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 static UiLinkId uiLinkId(Link link)
link
- link for which the identifier is requiredNullPointerException
- if src or dst connect point is nullpublic static UiLinkId uiLinkId(LinkKey lk)
lk
- link keyNullPointerException
- if src or dst connect point is nullpublic static UiLinkId uiLinkId(RegionId one, RegionId two)
one
- the first region IDtwo
- the second region IDNullPointerException
- if any of the required fields are nullIllegalArgumentException
- if the identifiers are identicalpublic static UiLinkId uiLinkId(RegionId regionId, DeviceId deviceId, PortNumber portNumber)
regionId
- region IDdeviceId
- device IDportNumber
- port numberNullPointerException
- 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 BNullPointerException
- if any of the required fields are nullpublic static UiLinkId uiLinkId(HostId h, DeviceId d, PortNumber p)
h
- hostd
- devicep
- portNullPointerException
- if any of the required fields are null