public abstract class BiLink
extends java.lang.Object
Subclasses will decide how to generate the link highlighting (coloring and labeling) for the topology view.
As an alternative, a bi-link can be initialized with a UiLinkId
(ignoring the LinkKey and links one and two), which will be reported as
its identifier instead.
Constructor and Description |
---|
BiLink(LinkKey key,
Link link)
Constructs a bi-link for the given key and initial link.
|
BiLink(UiLinkId uilinkId)
Constructs a bi-link for the given UI link identifier; sets remaining
fields to null.
|
Modifier and Type | Method and Description |
---|---|
abstract LinkHighlight |
highlight(java.lang.Enum<?> type)
Returns the link highlighting to use, based on this bi-link's current
state.
|
LinkKey |
key()
Returns the key for this bi-link.
|
java.lang.String |
linkId()
Returns the link identifier in the form expected on the Topology View
in the web client.
|
Link |
one()
Returns the first link in this bi-link.
|
void |
setOther(Link link)
Sets the second link for this bi-link.
|
java.lang.String |
toString() |
Link |
two()
Returns the second link in this bi-link.
|
UiLinkId |
uiLinkId()
Returns the UI link identifier for this bi-link (if set).
|
public BiLink(LinkKey key, Link link)
TopoUtils.canonicalLinkKey(Link)
to generate the key.key
- canonical key for this bi-linklink
- first linkpublic BiLink(UiLinkId uilinkId)
uilinkId
- canonical ID for this bi-linkpublic void setOther(Link link)
link
- second linkpublic java.lang.String linkId()
public UiLinkId uiLinkId()
public LinkKey key()
public Link one()
public Link two()
public java.lang.String toString()
toString
in class java.lang.Object
public abstract LinkHighlight highlight(java.lang.Enum<?> type)
type
- optional highlighting type parameter