Package 

Object TypeSpecificityComparator

  • All Implemented Interfaces:
    java.util.Comparator

    
    public class TypeSpecificityComparator
     implements Comparator<TypeMirror>
                        

    A comparator that compares the "specificity" of a TypeMirror. Essentially a more specific type can be cast to a less specific type, but not the other way around. If neither type can be cast to the other or both types can be cast to each other they have equal specificity.

    Precisely, a is more specific than b when b.isAssignableFrom(a) && !a.isAssignableFrom(b).

    • Method Summary

      Modifier and Type Method Description
      Integer compare(TypeMirror o1, TypeMirror o2)
      • Methods inherited from class dev.thecodewarrior.mirror.type.TypeSpecificityComparator

        reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait