Enum PluginComparator

java.lang.Object
java.lang.Enum<PluginComparator>
org.codehaus.mojo.versions.utils.PluginComparator
All Implemented Interfaces:
Serializable, Comparable<PluginComparator>, Comparator<Object>

public enum PluginComparator extends Enum<PluginComparator> implements Comparator<Object>
A comparator used to sort plugins and report plugins by group id, artifact id and finally version.
Since:
1.0-beta-1
  • Enum Constant Details

  • Method Details

    • values

      public static PluginComparator[] 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 PluginComparator 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(Object o1, Object o2)
      Compares to Plugin or ReportPlugin instances.
      Specified by:
      compare in interface Comparator<Object>
      Parameters:
      o1 - the first object
      o2 - the second object.
      Returns:
      the comparison result
      Since:
      1.0-beta-1
      See Also: