|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A node in a network. This is the encapsulating Object, containing both a graphical representation of the node and an algorithmic representation. A node has some properties and may be not working.
Node
,
Node
Field Summary | |
static String |
ACTIVE_PROPERTY_NAME
Name of the 'active' Property |
static String |
LABEL_PROPERTY_NAME
Name of the 'label' Property |
static String |
NODE_TYPE_PROPERTY_NAME
name of the nodeType property |
Fields inherited from interface fdda.model.WorkingPart |
WORKING_PROPERTY_NAME |
Method Summary | |
void |
addConnection(Connection connection)
Adds a connection to the node. |
boolean |
canSendMessageDirectlyTo(Node node)
Returns whether the node can send a message through (exactly) one connections to another node. |
Node |
getAlgorithmicNode()
Returns the algorithmic representation of the node. |
List |
getConnections()
Returns all the connections starting or ending at the node. |
Node |
getGraphicalRepresentation()
Returns the graphical representation of the node. |
List |
getIncomingConnections()
Returns all directed connections ending at the node and all undirected connections of the node. |
String |
getLabel()
Returns the label of the node, which can identify the node for an user. |
List |
getNeighbours()
Returns all nodes that are directly connected to this node through a connection (either directed or undirected). |
int |
getNr()
Returns the internal number of the node, which is unique. |
List |
getOutgoingConnections()
Returns all directed connections starting at the node and all undirected connections of the node. |
Project |
getProject()
Returns the project that contains this node. |
void |
initialize()
Initializes the node. |
boolean |
isConnectedTo(Node node)
Returns whether there exists a connection that may transport messages directly between this node and another node. |
boolean |
isNeighbouredTo(Node node)
Returns whether the node is a neighbour of the node in the parameter. |
boolean |
isRepeater()
Returns whether this node is a repeater. |
void |
removeConnection(Connection connection)
Removes a connection from the node. |
void |
setAlgorithmicNode(Node algorithmicNode)
Specifies the algorithmic representation of the node. |
void |
setLabel(String label)
Sets the label of the node. |
Methods inherited from interface fdda.model.PropertyHolder |
addProperty, addPropertyListener, changeProperty, firePropertyChanged, getProperties, getProperty, removeProperty, removePropertyListener |
Methods inherited from interface fdda.model.WorkingPart |
isWorking, setWorking |
Field Detail |
public static final String NODE_TYPE_PROPERTY_NAME
public static final String LABEL_PROPERTY_NAME
public static final String ACTIVE_PROPERTY_NAME
Method Detail |
public void initialize()
public Node getGraphicalRepresentation()
public Node getAlgorithmicNode()
public void setAlgorithmicNode(Node algorithmicNode)
algorithmicNode
- the algorithmic representationpublic int getNr()
public String getLabel()
public void setLabel(String label)
label
- the new label.public List getConnections()
public List getOutgoingConnections()
public List getIncomingConnections()
public List getNeighbours()
public boolean isNeighbouredTo(Node node)
node
- a node
public boolean canSendMessageDirectlyTo(Node node)
node
- a node
public boolean isConnectedTo(Node node)
node
- a node
public void addConnection(Connection connection)
connection
- a connectionpublic void removeConnection(Connection connection)
connection
- a connectionpublic Project getProject()
public boolean isRepeater()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |