public class OWLEntityComparator extends java.lang.Object implements java.util.Comparator<OWLEntity>, OWLEntityVisitor, java.io.Serializable
Comparator
which compares entities. Entities are compared first
by their type (in the following order: Class, Object property, Data property, Individual,
Datatype) then by their short form (using the specified short form provider).Constructor and Description |
---|
OWLEntityComparator(ShortFormProvider shortFormProvider)
Constructs an entity comparator which uses the specified short form
provider
|
Modifier and Type | Method and Description |
---|---|
int |
compare(OWLEntity o1,
OWLEntity o2) |
void |
visit(OWLAnnotationProperty property) |
void |
visit(OWLClass cls) |
void |
visit(OWLDataProperty property) |
void |
visit(OWLDatatype datatype) |
void |
visit(OWLNamedIndividual individual) |
void |
visit(OWLObjectProperty property) |
public OWLEntityComparator(ShortFormProvider shortFormProvider)
shortFormProvider
- the short form provider to usepublic int compare(OWLEntity o1, OWLEntity o2)
compare
in interface java.util.Comparator<OWLEntity>
public void visit(OWLClass cls)
visit
in interface OWLEntityVisitor
public void visit(OWLObjectProperty property)
visit
in interface OWLEntityVisitor
public void visit(OWLDataProperty property)
visit
in interface OWLEntityVisitor
public void visit(OWLNamedIndividual individual)
visit
in interface OWLEntityVisitor
public void visit(OWLAnnotationProperty property)
visit
in interface OWLEntityVisitor
public void visit(OWLDatatype datatype)
visit
in interface OWLEntityVisitor