Class AbstractComplexComparator<C>
- java.lang.Object
-
- org.silverpeas.core.util.comparator.AbstractComparator<C>
-
- org.silverpeas.core.util.comparator.AbstractComplexComparator<C>
-
- Type Parameters:
C
-
- All Implemented Interfaces:
Serializable
,Comparator<C>
- Direct Known Subclasses:
CategoryDetailComparator
,LinkDetailComparator
,SubscriptionComparator
,UserDetail.OnCreationDate
,UserDetail.OnFirstNameAndLastName
public abstract class AbstractComplexComparator<C> extends AbstractComparator<C>
This tool handles all the boilerplate of sort implementations of list of data.By default, the text comparison takes not care about accent and case.
To deactivate this behavior, please call from constructorAbstractComparator.strictComparisonOnText()
method.- Author:
- Yohann Chastagnier
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
AbstractComplexComparator.StringWrapper
Class that permits to put null or empty String value always at the bottom of a list.class
AbstractComplexComparator.ValueBuffer
A value
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractComplexComparator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
compare(C o1, C o2)
protected abstract AbstractComplexComparator.ValueBuffer
getValuesToCompare(C object)
Value list to compare-
Methods inherited from class org.silverpeas.core.util.comparator.AbstractComparator
compare, strictComparisonOnText
-
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
-
-
-
-
Method Detail
-
getValuesToCompare
protected abstract AbstractComplexComparator.ValueBuffer getValuesToCompare(C object)
Value list to compare
-
-