Class BasicTypeInfoComparator

    • Constructor Detail

      • BasicTypeInfoComparator

        public BasicTypeInfoComparator​(Function<TypeInfo,​org.eclipse.xtext.naming.QualifiedName> typeInfoQualifiedNameProfider)
        Creates a new Comparator for instances of TypeInfo.
        Parameters:
        typeInfoQualifiedNameProfider - function provide QualifiedName by typeInfo, cannot be null.
    • Method Detail

      • compare

        public int compare​(TypeInfo o1,
                           TypeInfo o2)
        Compares the given TypeInfos first by their order, then by their code; the script variant provided in constructor specifies what code to use.
        Specified by:
        compare in interface Comparator<TypeInfo>