Class InstanceReferenceComparator

java.lang.Object
com.aquima.interactions.profile.model.InstanceReferenceComparator
All Implemented Interfaces:
Comparator<IPrimitiveValue>

public class InstanceReferenceComparator extends Object implements Comparator<IPrimitiveValue>
This class is used to sort the instance references from a context expression.
Since:
8.3
Author:
Jon van Leuven
  • Constructor Details

    • InstanceReferenceComparator

      public InstanceReferenceComparator(IProfile profile)
      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

      public InstanceReferenceComparator(IProfile profile, String sortAttribute, boolean sortAscending)
      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