private int comparePathValues(T leftBean, T rightBean) {
        V left = accessor.apply(leftBean);
        V right = accessor.apply(rightBean);
        if (left == null) {
            return -1;
        } else if (right == null) {
            return 1;
        } else {
            return left.compareTo(right);
        }
    }
Compares two beans based on the values at a specific path.

@author Jeroen van Schagen
@author tiwe

@param <T> type of the path root
@param <V> type of value being matched
querydsl-collections/src/main/java/com/querydsl/collections/PathComparator.java