org.grinvin

Class Element

Known Direct Subclasses:
Edge, Vertex

public class Element
extends java.lang.Object

Represents a graph element. Currently elements are either vertices or edges.

A graph elements may optionally carry some additional 'annotation' information (also known as a 'label') which is used to augment the way it is printed or displayed in a graphical environment.

Different elements in the same graph should be represented by different objects. Graphs are allowed to share vertices when this is meaningful, e.g., when both are subgraphs of the same graph.

See Also:
Vertex, Edge, DefaultGraphModel

Method Summary

Object
getAnnotation()
Annotation for this element.

Method Details

getAnnotation

public Object getAnnotation()
Annotation for this element.
Returns:
The annotation property for this element or null when this element is not annotated.