Class InstanceReferenceComparator
java.lang.Object
com.aquima.interactions.profile.model.InstanceReferenceComparator
- All Implemented Interfaces:
Comparator<IPrimitiveValue>
This class is used to sort the instance references from a context expression.
- Since:
- 8.3
- Author:
- Jon van Leuven
-
Constructor Summary
ConstructorsConstructorDescriptionInstanceReferenceComparator
(IProfile profile) Constructs a default instance comparator that sorts the instances ascending on sequence number.InstanceReferenceComparator
(IProfile profile, String sortAttribute, boolean sortAscending) Constructs the instance comparator with the name of the attribute the instances should be sorted on. -
Method Summary
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 Details
-
InstanceReferenceComparator
Constructs a default instance comparator that sorts the instances ascending on sequence number. The oldest instance (lowest sequence number) will be first.- Parameters:
profile
- The profile that contains the values used for sorting.
-
InstanceReferenceComparator
Constructs the instance comparator with the name of the attribute the instances should be sorted on.- Parameters:
profile
- The profile that contains the values used for sorting.sortAttribute
- The name of the attribute that should be used to sort the instances on.sortAscending
- Boolean indicating if the instances should be sorted ascending (true) or descending (false).
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<IPrimitiveValue>
-