Package org.ametys.runtime.model
Class CategorizedElementDefinitionWrapperComparator<T extends CategorizedElementDefinitionWrapper>
java.lang.Object
org.ametys.runtime.model.CategorizedElementDefinitionWrapperComparator<T>
- Type Parameters:
T- type of theCategorizedElementDefinitionWrapperto 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 -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
CategorizedElementDefinitionWrapperComparator
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<T extends CategorizedElementDefinitionWrapper>
-
compareWrappersWithSamePositions
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.
-