@Override
 protected int compareObjectOfSameType(OWLObject object) {
   OWLLiteral other = (OWLLiteral) object;
   int diff = getLiteral().compareTo(other.getLiteral());
   if (diff != 0) {
     return diff;
   }
   return datatype.compareTo(other.getDatatype());
 }
 @Override
 protected int compareObjectOfSameType(OWLObject object) {
   OWLDatatypeRestriction other = (OWLDatatypeRestriction) object;
   int diff = datatype.compareTo(other.getDatatype());
   if (diff != 0) {
     return diff;
   }
   return compareSets(facetRestrictions, other.getFacetRestrictions());
 }