Class PriorityAnnotationComparator<T>

java.lang.Object
org.axonframework.common.annotation.PriorityAnnotationComparator<T>
Type Parameters:
T - The type of object to compare
All Implemented Interfaces:
Comparator<T>

public class PriorityAnnotationComparator<T> extends Object implements Comparator<T>
Comparator that compares objects based on the value on an @Priority annotation.
Since:
2.1.2
Author:
Allard Buijze
  • Method Details

    • getInstance

      public static <T> PriorityAnnotationComparator<T> getInstance()
      Returns the instance of the comparator.
      Type Parameters:
      T - The type of values to compare
      Returns:
      a comparator comparing objects based on their @Priority annotation
    • compare

      public int compare(T o1, T o2)
      Specified by:
      compare in interface Comparator<T>