Class DescriptorComparitor
java.lang.Object
org.jvnet.hk2.generator.internal.DescriptorComparitor
- All Implemented Interfaces:
Comparator<DescriptorImpl>
This is a comparator making things that don't really compare, compare.
It is done to ensure that given the same set of descriptors we always
return the set in the same order, which will ensure that the output
of the generator is not different from run to run
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompare(DescriptorImpl o1, DescriptorImpl o2) private static intcompareStringMaps(Set<String> s1, Set<String> s2) private static <T> intsafeCompare(Comparable<T> a, T b) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
DescriptorComparitor
public DescriptorComparitor()
-
-
Method Details
-
safeCompare
-
compareStringMaps
-
compare
- Specified by:
comparein interfaceComparator<DescriptorImpl>
-