Enum 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 Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionintcompare(org.apache.maven.model.Dependency d1, org.apache.maven.model.Dependency d2) static DependencyComparatorReturns the enum constant of this type with the specified name.static DependencyComparator[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Enum Constant Details
-
INSTANCE
The singleton instance.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
compare
public int compare(org.apache.maven.model.Dependency d1, org.apache.maven.model.Dependency d2) - Specified by:
comparein interfaceComparator<org.apache.maven.model.Dependency>- Parameters:
d1- the first dependencyd2- the second dependency.- Returns:
- the comparison result
- Since:
- 1.0-alpha-1
- See Also:
-