com.alexmerz.graphviz.objects
Class Id

java.lang.Object
  extended by com.alexmerz.graphviz.objects.Id

public class Id
extends java.lang.Object

This object is used to identify graphs and nodes Note, that an object may contain an id or a label.

Version:
$Id: Id.java,v 1.3 2006/03/20 16:45:41 Alexander Exp $
Author:
Alexander Merz

Constructor Summary
Id()
           
 
Method Summary
 java.lang.String getId()
          Returns the Id of the object Empty string means, that this object has no Id.
 java.lang.String getLabel()
          Returns the label of the object
 boolean isEqual(Id eid)
          Compares the Ids.
 void setId(java.lang.String id)
          Sets the object id.
 void setLabel(java.lang.String label)
          Sets the label of the object
 java.lang.String toString()
          Returns the String representation of this Id
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Id

public Id()
Method Detail

getId

public java.lang.String getId()
Returns the Id of the object Empty string means, that this object has no Id.

Returns:
the object id

setId

public void setId(java.lang.String id)
Sets the object id. An empty string deletes the Id.

Parameters:
id -

getLabel

public java.lang.String getLabel()
Returns the label of the object

Returns:
the object label

setLabel

public void setLabel(java.lang.String label)
Sets the label of the object

Parameters:
label -

toString

public java.lang.String toString()
Returns the String representation of this Id

Overrides:
toString in class java.lang.Object
Returns:
the string representation

isEqual

public boolean isEqual(Id eid)
Compares the Ids. Two Id objects are equal, if

Parameters:
eid -
Returns:
true if both Ids are equal