Class ClassesThenInterfacesElementKindComparator
java.lang.Object
org.microbean.assign.ClassesThenInterfacesElementKindComparator
- All Implemented Interfaces:
- Comparator<ElementKind>
public final class ClassesThenInterfacesElementKindComparator
extends Object
implements Comparator<ElementKind>
- Author:
- Laird Nelson
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final ClassesThenInterfacesElementKindComparatorThe sole instance of this class.
- 
Method SummaryModifier and TypeMethodDescriptionfinal intcompare(ElementKind k0, ElementKind k1) Compares the twoElementKinds and returns the result.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparatorequals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
- 
Field Details- 
INSTANCEThe sole instance of this class.
 
- 
- 
Method Details- 
compareCompares the twoElementKinds and returns the result.If k0 == k1, returns0.If k0isnullandk1is not, returns a positive value.If k0is a class andk1is an interface, returns a negative value.If k0is an interface andk1is a class, returns a positive value.Returns 0in all other cases.- Specified by:
- comparein interface- Comparator<ElementKind>
- Parameters:
- k0- an- ElementKind; may be- null
- k1- an- ElementKind; may be- null
- Returns:
- a comparison result
- See Also:
 
 
-