Enum PropertyComparator

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

public enum PropertyComparator extends Enum<PropertyComparator> implements Comparator<Property>
A comparator used to sort Property instances.
Since:
1.0-beta-1
  • Enum Constant Details

  • Method Details

    • values

      public static PropertyComparator[] 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 PropertyComparator 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(Property p1, Property p2)
      Compares to Property instances.
      Specified by:
      compare in interface Comparator<Property>
      Parameters:
      p1 - the first object
      p2 - the second object.
      Returns:
      the comparison result
      Since:
      1.0-beta-1
      See Also: