docs: protected <X extends Comparable<? super X>> Specification<ENTITY> buildSpecification(RangeFilter<X> filter,
                                                                                           Function<Root<ENTITY>, Expression<X>> metaclassFunction) {
          if (filter.getEquals() != null) {
              return equalsSpecification(metaclassFunction, filter.getEquals());
          } else if (filter.getIn() != null) {
              return valueIn(metaclassFunction, filter.getIn());
          }
  
          Specification<ENTITY> result = Specification.where(null);
          if (filter.getSpecified() != null) {
              result = result.and(byFieldSpecified(metaclassFunction, filter.getSpecified()));
          }
          if (filter.getGreaterThan() != null) {
              result = result.and(greaterThan(metaclassFunction, filter.getGreaterThan()));
          }
          if (filter.getGreaterOrEqualThan() != null) {
              result = result.and(greaterThanOrEqualTo(metaclassFunction, filter.getGreaterOrEqualThan()));
          }
          if (filter.getLessThan() != null) {
              result = result.and(lessThan(metaclassFunction, filter.getLessThan()));
          }
          if (filter.getLessOrEqualThan() != null) {
              result = result.and(lessThanOrEqualTo(metaclassFunction, filter.getLessOrEqualThan()));
          }
          return result;
      }