Package org.incenp.obofoundry.sssom
Class DefaultMappingComparator
- java.lang.Object
-
- org.incenp.obofoundry.sssom.DefaultMappingComparator
-
- All Implemented Interfaces:
Comparator<Mapping>
public class DefaultMappingComparator extends Object implements Comparator<Mapping>
Comparator for mapping objects. This class allows to sort mappings in the order recommended by the SSSOM specification.The recommended order is obtained by sorting mappings on each slot, in the order they are listed in the specification. That is, mappings are compared first on their subject IDs, then on their subject labels, then on their subject categories, then on their predicate IDs, etc.
-
-
Constructor Summary
Constructors Constructor Description DefaultMappingComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(Mapping o1, Mapping o2)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
compare
public int compare(Mapping o1, Mapping o2)
- Specified by:
comparein interfaceComparator<Mapping>
-
-