Class PathComparator<T,V extends Comparable<V>>

java.lang.Object
com.querydsl.collections.PathComparator<T,V>
Type Parameters:
T - type of the path root
V - type of value being matched
All Implemented Interfaces:
Comparator<T>

public class PathComparator<T,V extends Comparable<V>> extends Object implements Comparator<T>
Compares two beans based on the values at a specific path.
Author:
Jeroen van Schagen, tiwe
  • Constructor Details

    • PathComparator

      public PathComparator(com.querydsl.core.types.Path<V> comparingPath)
    • PathComparator

      public PathComparator(com.querydsl.core.types.Path<V> comparingPath, Function<T,V> accessor)
  • Method Details

    • pathComparator

      public static <T, V extends Comparable<V>> PathComparator<T,V> pathComparator(com.querydsl.core.types.Path<V> comparingPath)
    • compare

      public int compare(T leftBean, T rightBean)
      Specified by:
      compare in interface Comparator<T>