public class NodeSelection
extends java.lang.Object
Constructor and Description |
---|
NodeSelection(com.fasterxml.jackson.databind.node.ObjectNode payload,
DeviceService deviceService,
HostService hostService,
LinkService linkService)
Creates a node selection entity, from the given payload, using the
supplied link, device and host services.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<Device> |
devices()
Returns a view of the selected devices (hover not included).
|
java.util.Set<Device> |
devicesWithHover()
Returns a view of the selected devices, including the hovered device
if there was one.
|
java.util.Set<Host> |
hosts()
Returns a view of the selected hosts (hover not included).
|
java.util.Set<Host> |
hostsWithHover()
Returns a view of the selected hosts, including the hovered host
if thee was one.
|
Element |
hovered()
Returns the element (link, host or device) over which the mouse was hovering,
or null.
|
java.util.Set<Link> |
links()
Returns a view of the selected links (hover not included).
|
java.util.Set<Link> |
linksWithHover()
Returns a view of the selected links, including the hovered link
if thee was one.
|
boolean |
none()
Returns true if nothing is selected.
|
java.lang.String |
toString() |
public NodeSelection(com.fasterxml.jackson.databind.node.ObjectNode payload, DeviceService deviceService, HostService hostService, LinkService linkService)
hovered()
.payload
- message payloaddeviceService
- device servicehostService
- host servicelinkService
- link servicepublic java.util.Set<Device> devices()
public java.util.Set<Link> links()
public java.util.Set<Device> devicesWithHover()
public java.util.Set<Host> hosts()
public java.util.Set<Host> hostsWithHover()
public java.util.Set<Link> linksWithHover()
public Element hovered()
public boolean none()
public java.lang.String toString()
toString
in class java.lang.Object