Class DefaultResourceConfigSortComparator
- java.lang.Object
-
- org.smooks.engine.resource.config.DefaultResourceConfigSortComparator
-
- All Implemented Interfaces:
Comparator<org.smooks.api.resource.config.ResourceConfig>,org.smooks.api.resource.config.ResourceConfigSortComparator
public class DefaultResourceConfigSortComparator extends Object implements org.smooks.api.resource.config.ResourceConfigSortComparator
-
-
Constructor Summary
Constructors Constructor Description DefaultResourceConfigSortComparator(org.smooks.api.profile.ProfileSet profileSet)Private constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(org.smooks.api.resource.config.ResourceConfig configObj1, org.smooks.api.resource.config.ResourceConfig configObj2)protected doublegetSpecificity(org.smooks.api.resource.config.ResourceConfig resourceConfig)Get the specificity of the ResourceConfig.-
Methods inherited from class java.lang.Object
clone, equals, finalize, 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(org.smooks.api.resource.config.ResourceConfig configObj1, org.smooks.api.resource.config.ResourceConfig configObj2)- Specified by:
comparein interfaceComparator<org.smooks.api.resource.config.ResourceConfig>
-
getSpecificity
protected double getSpecificity(org.smooks.api.resource.config.ResourceConfig resourceConfig)
Get the specificity of the ResourceConfig. The "specificity" is evaluated based on the selector and target-profile values.- Parameters:
resourceConfig- Resource configuration.- Returns:
- Configuration specificity.
-
-