Package org.ametys.runtime.config
Class ConfigParameterDefinitionComparator
- java.lang.Object
-
- org.ametys.runtime.config.ConfigParameterDefinitionComparator
-
- All Implemented Interfaces:
Comparator<ModelItem>
public class ConfigParameterDefinitionComparator extends Object implements Comparator<ModelItem>
Comparator for the element definitions. Uses the position given by theCategorizedElementDefinitionWrapper
s If no position is set, compares the definitions themselves
-
-
Constructor Summary
Constructors Constructor Description ConfigParameterDefinitionComparator(Collection<ConfigParameterDefinitionWrapper> configParameterDefinitionWrappers)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(ModelItem item1, ModelItem item2)
protected ConfigParameterDefinitionWrapper
getWrapperFromDefinition(ElementDefinition definition)
Retrieves theConfigParameterDefinitionWrapper
corresponding to the given definition-
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
-
ConfigParameterDefinitionComparator
public ConfigParameterDefinitionComparator(Collection<ConfigParameterDefinitionWrapper> configParameterDefinitionWrappers)
Constructor- Parameters:
configParameterDefinitionWrappers
- the wrappers containing the position of the config parameter definitions
-
-
Method Detail
-
compare
public int compare(ModelItem item1, ModelItem item2)
- Specified by:
compare
in interfaceComparator<ModelItem>
-
getWrapperFromDefinition
protected ConfigParameterDefinitionWrapper getWrapperFromDefinition(ElementDefinition definition)
Retrieves theConfigParameterDefinitionWrapper
corresponding to the given definition- Parameters:
definition
- the definition- Returns:
- the corresponding
ConfigParameterDefinitionWrapper
-
-