package net.catpad.infobus;
/**
* The unique identifier of the service thread.
*
* @author Michael Gertelman
*
*/
public class ServiceId {
/**
* The identifier of the service thread
*/
private int id;
/**
* This name is used for the debugging and logging purposes only
*/
private String name;
private String display = null;
public ServiceId(int id, String name) {
this.id = id;
this.name = name;
display = "[" + this.name + "]";
}
public String toString() {
return display;
}
/**
* Two service ids are equal when there integer ids are equal.
* @param anotherId
* @return boolean
*/
public boolean equals(ServiceId anotherId) {
return (this.id == anotherId.id);
}
}
|