Package org.onosproject.ui.topo
Class NodeSelection
- java.lang.Object
- 
- org.onosproject.ui.topo.NodeSelection
 
- 
 public class NodeSelection extends java.lang.ObjectEncapsulates a selection of devices, hosts and links from the topology view.
- 
- 
Constructor SummaryConstructors Constructor 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.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method 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.Elementhovered()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.booleannone()Returns true if nothing is selected.java.lang.StringtoString()
 
- 
- 
- 
Constructor Detail- 
NodeSelectionpublic 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. Note that if a link, device or host was hovered over by the mouse, it is available viahovered().- Parameters:
- payload- message payload
- deviceService- device service
- hostService- host service
- linkService- link service
 
 
- 
 - 
Method Detail- 
devicespublic java.util.Set<Device> devices() Returns a view of the selected devices (hover not included).- Returns:
- selected devices
 
 - 
linkspublic java.util.Set<Link> links() Returns a view of the selected links (hover not included).- Returns:
- selected links
 
 - 
devicesWithHoverpublic java.util.Set<Device> devicesWithHover() Returns a view of the selected devices, including the hovered device if there was one.- Returns:
- selected (plus hovered) devices
 
 - 
hostspublic java.util.Set<Host> hosts() Returns a view of the selected hosts (hover not included).- Returns:
- selected hosts
 
 - 
hostsWithHoverpublic java.util.Set<Host> hostsWithHover() Returns a view of the selected hosts, including the hovered host if thee was one.- Returns:
- selected (plus hovered) hosts
 
 - 
linksWithHoverpublic java.util.Set<Link> linksWithHover() Returns a view of the selected links, including the hovered link if thee was one.- Returns:
- selected (plus hovered) links
 
 - 
hoveredpublic Element hovered() Returns the element (link, host or device) over which the mouse was hovering, or null.- Returns:
- element hovered over
 
 - 
nonepublic boolean none() Returns true if nothing is selected.- Returns:
- true if nothing selected
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-