@Override public int compareTo(@Nullable OWLObject o) { if (o == null) { throw new NullPointerException("o cannot be null in a compareTo call."); } int diff = Integer.compare(typeIndex(), o.typeIndex()); if (diff != 0) { return diff; } if (o instanceof OWLDatatype) { diff = getIRI().compareTo(((OWLDatatype) o).getIRI()); } return diff; }
@Override public int compareTo(@Nullable OWLObject o) { if (o == null) { throw new NullPointerException("o cannot be null in a compareTo call."); } int diff = Integer.compare(typeIndex(), o.typeIndex()); if (diff != 0) { return diff; } if (o instanceof OWLDatatype) { diff = getIRI().compareTo(((OWLDatatype) o).getIRI()); } return diff; }
@Override public int compareTo(@Nullable OWLObject o) { if (o == null) { throw new NullPointerException("o cannot be null in a compareTo call."); } int diff = Integer.compare(typeIndex(), o.typeIndex()); if (diff != 0) { return diff; } if (o instanceof OWLDatatype) { diff = getIRI().compareTo(((OWLDatatype) o).getIRI()); } return diff; }
@Override public int compareTo(@Nullable OWLObject o) { if (o == null) { throw new NullPointerException("o cannot be null in a compareTo call."); } int diff = Integer.compare(typeIndex(), o.typeIndex()); if (diff != 0) { return diff; } if (o instanceof OWLDatatype) { diff = getIRI().compareTo(((OWLDatatype) o).getIRI()); } return diff; }
@Override public int compareTo(OWLObject o) { if (!(o instanceof OWLDatatype)) { OWLObjectTypeIndexProvider provider = new OWLObjectTypeIndexProvider(); return provider.getTypeIndex(o); } OWLDatatype other = (OWLDatatype) o; return getIRI().compareTo(other.getIRI()); }
@Override public int compareTo(OWLObject o) { if (!(o instanceof OWLDatatype)) { OWLObjectTypeIndexProvider provider = new OWLObjectTypeIndexProvider(); return provider.getTypeIndex(o); } OWLDatatype other = (OWLDatatype) o; return getIRI().compareTo(other.getIRI()); }