/** * Generates an expression to select all elements with an attribute value less than or equal to * the given value. For example: filtering by (-∞, 5] would select only those elements with values * less than or equal to 5. * * @param value the upper endpoint of the range (-∞, v] * @return a filter expression for the given range */ public List<FilterExpression<T>> isLessThanOrEqualTo(final V value) { return singletonList(filterBy(FilterRange.atMost(value))); }
/** * Generates an expression to select all elements with an attribute value within the range defined * by the given endpoints. For example: filtering by [3, 5] would select only those elements with * values between 3 and 5, inclusive. * * @param lowerEndpoint the lower endpoint of the range of values to filter by, inclusive * @param upperEndpoint the upper endpoint of the range of values to filter by, inclusive * @return a filter expression for the given range */ public List<FilterExpression<T>> isBetween(final V lowerEndpoint, final V upperEndpoint) { return singletonList(filterBy(FilterRange.of(lowerEndpoint, upperEndpoint))); }