Class DefaultResourceConfigSortComparator
- java.lang.Object
-
- org.smooks.engine.resource.config.DefaultResourceConfigSortComparator
-
- All Implemented Interfaces:
Comparator<ResourceConfig>
,ResourceConfigSortComparator
public class DefaultResourceConfigSortComparator extends Object implements ResourceConfigSortComparator
-
-
Constructor Summary
Constructors Constructor Description DefaultResourceConfigSortComparator(ProfileSet profileSet)
Private constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(ResourceConfig configObj1, ResourceConfig configObj2)
protected double
getSpecificity(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
-
-
-
-
Constructor Detail
-
DefaultResourceConfigSortComparator
public DefaultResourceConfigSortComparator(ProfileSet profileSet)
Private constructor.- Parameters:
profileSet
- Profile set used to evaluate specificity.
-
-
Method Detail
-
compare
public int compare(ResourceConfig configObj1, ResourceConfig configObj2)
- Specified by:
compare
in interfaceComparator<ResourceConfig>
-
getSpecificity
protected double getSpecificity(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.
-
-