It's unclear in your question whether you are talking about parsing text expressions or for a library that allows predicates to be defined.
If you are referring to the latter, Java 8 makes defining the predicates fairly easy. Your predicates could be represented as:
List<BiFunction<Integer, Integer, Boolean>> conditionals;
And then set as:
conditionals.add((x, y) -> x >= 2);
conditionals.add((x, y) -> x < 6);
conditionals.add((x, y) -> y > 2 * x);
And so on.
Then testing against a defined range for x and y could look like:
private boolean anyMatch(int xMin, int xMax, int yMin, int yMax) {
IntStream.rangeClosed(xMin, xMax).anyMatch(x ->
IntStream.rangeClosed(yMin, yMax).anyMatch(y ->
conditionals.stream().allMatch(c -> c.apply(x, y))));
}
At the moment this is assuming two variables. If you want to extend to cover any number it's still possible with the built-in classes by representing the values of the variables as a map:
List<Function<Map<String, Integer>, Boolean>> conditionals;
conditionals.add(vars -> vars.get("x") >= 2);
conditionals.add(vars -> vars.get("y") > 2 * vars.get("x"));
This design could be used fairly easily to exclude adding predicates that are incompatible over a given range.
If you want to do something more complicated that retains information about allowed ranges without iterating over a specified domain then I think you'll need a custom class for that.