protected int compareAnnotations(List<OWLAnnotation> l1, List<OWLAnnotation> l2) { int i = 0; for (; i < l1.size() && i < l2.size(); i++) { int diff = l1.get(i).compareTo(l2.get(i)); if (diff != 0) { return diff; } } if (i < l2.size()) { // l1 is shorter and a sublist of l2 return -1; } if (i < l1.size()) { // l2 is shorter and a sublist of l1 return 1; } // lists are identical return 0; }
protected int compareAnnotations(List<OWLAnnotation> l1, List<OWLAnnotation> l2) { int i = 0; for (; i < l1.size() && i < l2.size(); i++) { int diff = l1.get(i).compareTo(l2.get(i)); if (diff != 0) { return diff; } } if (i < l2.size()) { // l1 is shorter and a sublist of l2 return -1; } if (i < l1.size()) { // l2 is shorter and a sublist of l1 return 1; } // lists are identical return 0; }
protected int compareAnnotations(List<OWLAnnotation> l1, List<OWLAnnotation> l2) { int i = 0; for (; i < l1.size() && i < l2.size(); i++) { int diff = l1.get(i).compareTo(l2.get(i)); if (diff != 0) { return diff; } } if (i < l2.size()) { // l1 is shorter and a sublist of l2 return -1; } if (i < l1.size()) { // l2 is shorter and a sublist of l1 return 1; } // lists are identical return 0; }
protected int compareAnnotations(List<OWLAnnotation> l1, List<OWLAnnotation> l2) { int i = 0; for (; i < l1.size() && i < l2.size(); i++) { int diff = l1.get(i).compareTo(l2.get(i)); if (diff != 0) { return diff; } } if (i < l2.size()) { // l1 is shorter and a sublist of l2 return -1; } if (i < l1.size()) { // l2 is shorter and a sublist of l1 return 1; } // lists are identical return 0; }
protected int compareAnnotations(List<OWLAnnotation> l1, List<OWLAnnotation> l2) { int i = 0; for (; i < l1.size() && i < l2.size(); i++) { int diff = l1.get(i).compareTo(l2.get(i)); if (diff != 0) { return diff; } } if (i < l2.size()) { // l1 is shorter and a sublist of l2 return -1; } if (i < l1.size()) { // l2 is shorter and a sublist of l1 return 1; } // lists are identical return 0; }
protected int compareAnnotations(List<OWLAnnotation> l1, List<OWLAnnotation> l2) { int i = 0; for (; i < l1.size() && i < l2.size(); i++) { int diff = l1.get(i).compareTo(l2.get(i)); if (diff != 0) { return diff; } } if (i < l2.size()) { // l1 is shorter and a sublist of l2 return -1; } if (i < l1.size()) { // l2 is shorter and a sublist of l1 return 1; } // lists are identical return 0; }