Package com.alexmerz.graphviz.objects
Class Id
java.lang.Object
com.alexmerz.graphviz.objects.Id
This object is used to identify graphs and nodes
Note, that an object may contain an id or a label.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetId()Returns the Id of the object Empty string means, that this object has no Id.getLabel()Returns the label of the objectbooleanCompares the Ids.voidSets the object id.voidSets the label of the objecttoString()Returns the String representation of this Id
-
Constructor Details
-
Id
public Id()
-
-
Method Details
-
getId
Returns the Id of the object Empty string means, that this object has no Id.- Returns:
- the object id
-
setId
Sets the object id. An empty string deletes the Id.- Parameters:
id-
-
getLabel
Returns the label of the object- Returns:
- the object label
-
setLabel
Sets the label of the object- Parameters:
label-
-
toString
Returns the String representation of this Id -
isEqual
Compares the Ids. Two Id objects are equal, if- both are the same, or
- Id and Label attribute are equal
- both ids are empty and the labels are equal
- Parameters:
eid-- Returns:
- true if both Ids are equal
-