Package org.ametys.runtime.config
Class ConfigParameterDefinitionComparator
java.lang.Object
org.ametys.runtime.config.ConfigParameterDefinitionComparator
- All Implemented Interfaces:
Comparator<ModelItem>
Comparator for the element definitions. Uses the position given by the
CategorizedElementDefinitionWrapper
s
If no position is set, compares the definitions themselves-
Constructor Summary
ConstructorDescriptionConfigParameterDefinitionComparator
(Collection<ConfigParameterDefinitionWrapper> configParameterDefinitionWrappers) Constructor -
Method Summary
Modifier and TypeMethodDescriptionint
protected ConfigParameterDefinitionWrapper
getWrapperFromDefinition
(ElementDefinition definition) Retrieves theConfigParameterDefinitionWrapper
corresponding to the given definitionMethods 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 Details
-
ConfigParameterDefinitionComparator
public ConfigParameterDefinitionComparator(Collection<ConfigParameterDefinitionWrapper> configParameterDefinitionWrappers) Constructor- Parameters:
configParameterDefinitionWrappers
- the wrappers containing the position of the config parameter definitions
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<ModelItem>
-
getWrapperFromDefinition
Retrieves theConfigParameterDefinitionWrapper
corresponding to the given definition- Parameters:
definition
- the definition- Returns:
- the corresponding
ConfigParameterDefinitionWrapper
-