static String andGroup(Iterable<String> items) { if (items.length == 1) { return items.single; } else { return '(' + items.join(' AND ') + ')'; } }