Package org.ametys.runtime.model
Class CategorizedElementDefinitionWrapperComparator<T extends CategorizedElementDefinitionWrapper>
- java.lang.Object
-
- org.ametys.runtime.model.CategorizedElementDefinitionWrapperComparator<T>
-
- Type Parameters:
T
- type of theCategorizedElementDefinitionWrapper
to compare
- All Implemented Interfaces:
Comparator<T>
public class CategorizedElementDefinitionWrapperComparator<T extends CategorizedElementDefinitionWrapper> extends Object implements Comparator<T>
Comparator for the element definition wrappers using their position If no position is set, compares the definitions themselves
-
-
Constructor Summary
Constructors Constructor Description CategorizedElementDefinitionWrapperComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(T wrapper1, T wrapper2)
protected int
compareWrappersWithSamePositions(T wrapper1, T wrapper2)
Compares the given wrappers that have the same (maybe not set) positions-
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
-
CategorizedElementDefinitionWrapperComparator
public CategorizedElementDefinitionWrapperComparator()
-
-
Method Detail
-
compare
public int compare(T wrapper1, T wrapper2)
- Specified by:
compare
in interfaceComparator<T extends CategorizedElementDefinitionWrapper>
-
compareWrappersWithSamePositions
protected int compareWrappersWithSamePositions(T wrapper1, T wrapper2)
Compares the given wrappers that have the same (maybe not set) positions- Parameters:
wrapper1
- the first wrapperwrapper2
- the second wrapper- Returns:
- a negative integer, zero, or a positive integer as the first wrapper is less than, equal to, or greater than the second.
-
-