Package net.obvj.confectory.util
Class ConfigurationComparator
- java.lang.Object
-
- net.obvj.confectory.util.ConfigurationComparator
-
- All Implemented Interfaces:
Comparator<Configuration<?>>
public class ConfigurationComparator extends Object implements Comparator<Configuration<?>>
A comparison function forConfigurationobjects.- Since:
- 0.1.0
- Author:
- oswaldo.bapvic.jr (Oswaldo Junior)
-
-
Constructor Summary
Constructors Constructor Description ConfigurationComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(Configuration<?> first, Configuration<?> second)Compares twoConfigurationobjects for precedence.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
compare
public int compare(Configuration<?> first, Configuration<?> second)
Compares twoConfigurationobjects for precedence. Returns a negative integer, zero, or a positive integer as the firstConfigurationhas higher, equal, or lower precedence than the second.- Specified by:
comparein interfaceComparator<Configuration<?>>- Parameters:
first- the firstConfigurationto be comparedsecond- the secondConfigurationto be compared- Returns:
- a negative integer if the first
Configurationhas higher precedence; zero if both objects have the same precedence; or a positive integer as the first object has lower precedence than, equal to, or greater than the second.
-
-