visidia.graph
Class SupportVertex

java.lang.Object
  extended by visidia.misc.property.PropertyTable
      extended by visidia.graph.Vertex
          extended by visidia.graph.SupportVertex
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class SupportVertex
extends Vertex

A SupportVertex in an element of a graph on which sensors move.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class visidia.graph.Vertex
edges, neighbors
 
Constructor Summary
SupportVertex(int id)
          Instantiates a new support vertex.
 
Method Summary
 void addSensor(Sensor sensor)
          Adds the sensor.
 java.lang.Object clone()
          Returns a clone of this vertex (shallow copy).
 java.util.Enumeration<Sensor> getHostedSensors()
          Gets the hosted sensors.
 int getNbHostedSensors()
          Gets the number of hosted sensors.
 boolean isEmpty()
          Checks if is empty.
 boolean isTheLastSensor(Sensor sensor)
          Checks if is the last sensor.
 void removeSensor(Sensor sensor)
          Removes the sensor.
 
Methods inherited from class visidia.graph.Vertex
degree, getDoorTo, getEdge, getEdges, getId, getLabel, getNeighborByDoor, getNeighbors, isSwitchedOn, linkTo, merge, removeIncidentEdges, resetProperties, setId, setLabel, setProperty, setSwitchedOn, unlink
 
Methods inherited from class visidia.misc.property.PropertyTable
containsElement, entrySet, getLockOwner, getPropertyKeys, getVisidiaProperty, isPersistentProperty, locked, lockProperties, removeProperty, setProperties, setVisidiaProperty, unlockProperties
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SupportVertex

public SupportVertex(int id)
Instantiates a new support vertex.

Parameters:
id - the id
Method Detail

clone

public java.lang.Object clone()
Description copied from class: Vertex
Returns a clone of this vertex (shallow copy).

Overrides:
clone in class Vertex
Returns:
a clone of this vertex
See Also:
Object.clone()

addSensor

public void addSensor(Sensor sensor)
Adds the sensor.

Parameters:
sensor - the sensor

removeSensor

public void removeSensor(Sensor sensor)
Removes the sensor.

Parameters:
sensor - the sensor

isEmpty

public boolean isEmpty()
Checks if is empty.

Returns:
true, if is empty

getHostedSensors

public java.util.Enumeration<Sensor> getHostedSensors()
Gets the hosted sensors.

Returns:
the hosted sensors

isTheLastSensor

public boolean isTheLastSensor(Sensor sensor)
Checks if is the last sensor.

Parameters:
sensor - the sensor
Returns:
true, if is the last sensor

getNbHostedSensors

public int getNbHostedSensors()
Gets the number of hosted sensors.

Returns:
the number of hosted sensors