package uk.ac.lkl.migen.mockup.shapebuilder;
/**
* This class provides a general ID for the whole system. This ID is a
* combination of a name (a String) and an integer, so you can only have
* slightly more than 4 GigaIDs.
*
* @author Sergio Gutirrez (sergut at gmail.com)
* @version 1.0
*
*/
public class ID {
/**
* The name of this ID.
*/
String name;
/**
* The index of this ID.
*/
int index;
public ID(String myName, int myIndex) {
name = myName;
index = myIndex;
}
/**
* Get the index of this ID.
*/
public int getIndex() {
return index;
}
/**
* Get the name of this ID.
*/
public String getName() {
return name;
}
/**
* Print a nice String that represents this ID.
*/
public String toString() {
return name + index;
}
}
|