|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Vertex
A Vertex represents a node in a Graph. A Vertex has knowledge about the Edges connected to it, and offers utility methods for retrieving neighbouring Vertices in the Graph.
| Method Summary | |
|---|---|
void |
add(Edge edge)
Adds an Edge to the set of Edges of this Vertex. |
Collection<Vertex> |
getConnectedVertices()
Returns a set containing all Vertices that are connected to this Vertex following zero (!) or more Edges in the Graph. |
Collection<Vertex> |
getConnectedVertices(int nrLevels)
Returns a set containing all Vertices that are connected to this Vertex following zero or more Edges in the Graph, with the specified number as an upper bound of the number of Edges that may be followed. |
Collection<Vertex> |
getConnectedVertices(int nrLevels,
Collection<Vertex> allowedVertices,
Collection<Edge> allowedEdges)
Returns a set containing all Vertices that are connected to this Vertex following zero or more Edges in the Graph, with the specified number as an upper bound of the number of Edges that may be followed. |
Collection<Edge> |
getEdges()
Returns the set of Edges of this Vertex. |
String |
getLabel()
The text to display along the Vertex' node. |
Object |
getLayoutAttribute()
Returns the layout attribute of this Vertex. |
Collection<Vertex> |
getNeighbours()
Returns the set of all Vertices that are directly connected to this Vertex. |
Object |
getRenderingAttribute()
Returns the rendering attribute of this Vertex. |
float |
getWeight()
The weight of the Vertex. |
boolean |
isConnectedBy(Edge edge)
Returns whether this Vertex is connected to the specified Edge. |
boolean |
isConnectedTo(Vertex vertex)
Returns whether this Vertex is directly connected to the specified Vertex by an Edge. |
boolean |
remove(Edge edge)
Removes an Edge from the set of Edges of this Vertex. |
void |
setLayoutAttribute(Object layoutAttribute)
Sets the layout attribute of this Vertex. |
void |
setRenderingAttribute(Object renderingAttribute)
Sets the rendering attribute of this Vertex. |
| Methods inherited from interface info.aduna.linkmap.graph.Highlightable |
|---|
getHighlightLevel, setHighlightLevel |
| Method Detail |
|---|
String getLabel()
float getWeight()
void add(Edge edge)
boolean remove(Edge edge)
Collection<Edge> getEdges()
Object getLayoutAttribute()
void setLayoutAttribute(Object layoutAttribute)
Object getRenderingAttribute()
void setRenderingAttribute(Object renderingAttribute)
boolean isConnectedTo(Vertex vertex)
boolean isConnectedBy(Edge edge)
Collection<Vertex> getNeighbours()
Collection<Vertex> getConnectedVertices()
Collection<Vertex> getConnectedVertices(int nrLevels)
Collection<Vertex> getConnectedVertices(int nrLevels,
Collection<Vertex> allowedVertices,
Collection<Edge> allowedEdges)
The specified Collections can be used to restrict the traversal of the Graph to a specific set of Vertices and/or Edges. This is for example useful when a Vertex belonging to a certain Graph has references to Edges and other Vertices not belonging to the same Graph (which may happen when the Graph is a subgraph of another Graph). Specifying 'null' means that the Vertices or Edges should not be checked this way.
If the specified number is zero, only a set containing this Vertex will be returned. If the specified number is less than zero, an infinite number of Edges may be followed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||