Class Comparators

java.lang.Object
com._1c.g5.v8.dt.common.Comparators

public class Comparators extends Object
Static utility methods pertaining to Comparator instances.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static Comparator<org.eclipse.core.runtime.IConfigurationElement>
    Returns a Comparator that compare IConfigurationElement elements using "order" attribute and ascending order.
    static Comparator<org.eclipse.core.runtime.IConfigurationElement>
    Returns a Comparator that compare IConfigurationElement elements using "priority" attribute and descending order.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Comparator<org.eclipse.core.runtime.IConfigurationElement>
    configComparator(String attribute, boolean order)
    Returns a Comparator that compare IConfigurationElement elements using specified attribute and order.
    static <T extends org.eclipse.emf.ecore.EObject>
    Comparator<T>
    intFeatureComparator(org.eclipse.emf.ecore.EStructuralFeature feature)
     
    static <T extends org.eclipse.emf.ecore.EObject>
    Comparator<T>
    strFeatureComparator(org.eclipse.emf.ecore.EStructuralFeature feature)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • PRIORITY

      public static Comparator<org.eclipse.core.runtime.IConfigurationElement> PRIORITY
      Returns a Comparator that compare IConfigurationElement elements using "priority" attribute and descending order.

      Compared elements MUST to have the "priority" attribute containing decimal number.

      See Also:
    • ORDER

      public static Comparator<org.eclipse.core.runtime.IConfigurationElement> ORDER
      Returns a Comparator that compare IConfigurationElement elements using "order" attribute and ascending order.

      Compared elements MUST to have the "order" attribute containing decimal number.

      See Also:
  • Constructor Details

    • Comparators

      public Comparators()
  • Method Details

    • configComparator

      public static Comparator<org.eclipse.core.runtime.IConfigurationElement> configComparator(String attribute, boolean order)
      Returns a Comparator that compare IConfigurationElement elements using specified attribute and order.

      Compared elements MUST to have the specified attribute containing decimal number.

      Parameters:
      attribute - - attribute of the IConfigurationElement element
      order - - ascending if true, descending otherwise
      Returns:
      the Comparator of the IConfigurationElement elements
    • intFeatureComparator

      public static <T extends org.eclipse.emf.ecore.EObject> Comparator<T> intFeatureComparator(org.eclipse.emf.ecore.EStructuralFeature feature)
    • strFeatureComparator

      public static <T extends org.eclipse.emf.ecore.EObject> Comparator<T> strFeatureComparator(org.eclipse.emf.ecore.EStructuralFeature feature)