Base class to enable objects to be compared for similarity.