private int compareAxioms(OWLAxiom ax1, OWLAxiom ax2) { if (ax1 != null && ax2 != null) { return ax1.compareTo(ax2); } else if (ax1 != null && ax2 == null) { return +1; } else if (ax1 == null && ax2 != null) { return -1; } else { return 0; } }
private int compareAxioms(OWLAxiom ax1, OWLAxiom ax2) { if (ax1 != null && ax2 != null) { return ax1.compareTo(ax2); } else if (ax1 != null && ax2 == null) { return +1; } else if (ax1 == null && ax2 != null) { return -1; } else { return 0; } }
public int compare(OWLFrameSectionRow<OWLOntology, OWLAxiom, OWLAxiom> o1, OWLFrameSectionRow<OWLOntology, OWLAxiom, OWLAxiom> o2) { int diff = o1.getAxiom().compareTo(o2.getAxiom()); if(diff != 0) { return diff; } else if (o1.getOntology() == null && o2.getOntology() == null) { return 0; } else if (o1.getOntology() == null) { return -1; } else if (o2.getOntology() == null) { return +1; } else { return o1.getOntology().compareTo(o2.getOntology()); } } };
public Comparator<OWLFrameSectionRow<OWLOntology, OWLAxiom, OWLAxiom>> getRowComparator() { return (o1, o2) -> { int diff = o1.getAxiom().compareTo(o2.getAxiom()); if(diff != 0) { return diff; } else if (o1.getOntology() == null && o2.getOntology() == null) { return 0; } else if (o1.getOntology() == null) { return -1; } else if (o2.getOntology() == null) { return +1; } else { return o1.getOntology().compareTo(o2.getOntology()); } }; } }
public Comparator<OWLFrameSectionRow<OWLOntology, OWLAxiom, OWLAxiom>> getRowComparator() { return (o1, o2) -> { int diff = o1.getAxiom().compareTo(o2.getAxiom()); if(diff != 0) { return diff; } else if (o1.getOntology() == null && o2.getOntology() == null) { return 0; } else if (o1.getOntology() == null) { return -1; } else if (o2.getOntology() == null) { return +1; } else { return o1.getOntology().compareTo(o2.getOntology()); } }; } }
public int compare(OWLFrameSectionRow<OWLOntology, OWLAxiom, OWLAxiom> o1, OWLFrameSectionRow<OWLOntology, OWLAxiom, OWLAxiom> o2) { int diff = o1.getAxiom().compareTo(o2.getAxiom()); if(diff != 0) { return diff; } else if (o1.getOntology() == null && o2.getOntology() == null) { return 0; } else if (o1.getOntology() == null) { return -1; } else if (o2.getOntology() == null) { return +1; } else { return o1.getOntology().compareTo(o2.getOntology()); } } };