Hi Kometa,
You need at least two child queries for and(). And in case you have no features to query, you need to decide then if the resulting query should match no objects, or all items.
You can write a helper method like this:
static Query<Car> queryFeatures(Collection<Query<Car>> features) {
switch (features.size()) {
case 0: return none(Car.class); // or all(Car.class) -- depends on your application needs
case 1: return features.iterator().next();
default: return and(features);
}
}
Hope that helps,
Niall