Class ServiceProcessor.DescriptorComparitor

  • All Implemented Interfaces:
    java.util.Comparator<DescriptorImpl>
    Enclosing class:
    ServiceProcessor

    private static class ServiceProcessor.DescriptorComparitor
    extends java.lang.Object
    implements java.util.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
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(DescriptorImpl o1, DescriptorImpl o2)  
      private static int compareStringMaps​(java.util.Set<java.lang.String> s1, java.util.Set<java.lang.String> s2)  
      private static <T> int safeCompare​(java.lang.Comparable<T> a, T b)  
      • 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
    • Constructor Detail

      • DescriptorComparitor

        private DescriptorComparitor()
    • Method Detail

      • safeCompare

        private static <T> int safeCompare​(java.lang.Comparable<T> a,
                                           T b)
      • compareStringMaps

        private static int compareStringMaps​(java.util.Set<java.lang.String> s1,
                                             java.util.Set<java.lang.String> s2)