Enum DependencyComparator

java.lang.Object
java.lang.Enum<DependencyComparator>
org.codehaus.mojo.versions.utils.DependencyComparator
All Implemented Interfaces:
Serializable, Comparable<DependencyComparator>, Comparator<org.apache.maven.model.Dependency>

public enum DependencyComparator extends Enum<DependencyComparator> implements Comparator<org.apache.maven.model.Dependency>
A comparator used to sort dependencies by group id, artifact id and finally version.
Since:
1.0-alpha-1
  • Enum Constant Details

  • Method Details

    • values

      public static DependencyComparator[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static DependencyComparator valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • compare

      public int compare(org.apache.maven.model.Dependency d1, org.apache.maven.model.Dependency d2)
      Specified by:
      compare in interface Comparator<org.apache.maven.model.Dependency>
      Parameters:
      d1 - the first dependency
      d2 - the second dependency.
      Returns:
      the comparison result
      Since:
      1.0-alpha-1
      See Also: