import org.wamblee.xmlrouter.config.Identifiable;
/**
- * Robust identifiable provides robustness for identifiable objects.
+ * Robust identifiable provides robustness for identifiable objects. It adds
+ * equality based on the id.
*
* @author Erik Brakkee
*
private Id<T> id;
- // TODO test this class.
- // TODO test that id is constant even though delegated changes its id.
-
public RobustIdentifiable(String aPrefix, Identifiable<T> aIdentifiable) {
notNull("prefix", aPrefix);
notNull("identifiable", aIdentifiable);
- // TODO test id is null
- // TODO getId() throws exception
try {
id = aIdentifiable.getId();
if (id == null) {
return id;
}
- // TODO test equals, hashcode.
-
@Override
public int hashCode() {
return id.hashCode();