| Nils Diewald | ea96950 | 2015-02-16 21:10:54 +0000 | [diff] [blame] | 1 | package de.ids_mannheim.korap.collection; |
| Nils Diewald | f399a67 | 2013-11-18 17:55:22 +0000 | [diff] [blame] | 2 | |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 3 | import java.util.*; |
| 4 | import java.io.IOException; |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 5 | |
| 6 | import org.apache.lucene.index.Term; |
| 7 | import org.apache.lucene.queries.TermsFilter; |
| 8 | import org.apache.lucene.search.*; |
| 9 | import org.apache.lucene.search.NumericRangeFilter; |
| Nils Diewald | c383ed0 | 2015-02-26 21:35:22 +0000 | [diff] [blame] | 10 | import de.ids_mannheim.korap.util.KrillDate; |
| Nils Diewald | fb4d7b0 | 2014-04-09 17:56:17 +0000 | [diff] [blame] | 11 | |
| Nils Diewald | f399a67 | 2013-11-18 17:55:22 +0000 | [diff] [blame] | 12 | import org.slf4j.Logger; |
| 13 | import org.slf4j.LoggerFactory; |
| Nils Diewald | f399a67 | 2013-11-18 17:55:22 +0000 | [diff] [blame] | 14 | |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 15 | import de.ids_mannheim.korap.KrillCollection; |
| 16 | import de.ids_mannheim.korap.collection.BooleanGroupFilter; |
| 17 | |
| Akron | aa74ec6 | 2015-07-31 17:22:55 +0200 | [diff] [blame] | 18 | /* |
| 19 | * TODO: Optimize! |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 20 | * - Remove identical object in Boolean groups |
| Akron | aa74ec6 | 2015-07-31 17:22:55 +0200 | [diff] [blame] | 21 | * - Flatten boolean groups |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 22 | * - create "between" ranges for multiple date objects |
| Akron | aa74ec6 | 2015-07-31 17:22:55 +0200 | [diff] [blame] | 23 | */ |
| 24 | |
| Nils Diewald | ea96950 | 2015-02-16 21:10:54 +0000 | [diff] [blame] | 25 | public class CollectionBuilder { |
| Nils Diewald | f399a67 | 2013-11-18 17:55:22 +0000 | [diff] [blame] | 26 | |
| 27 | // Logger |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 28 | private final static Logger log = LoggerFactory |
| 29 | .getLogger(KrillCollection.class); |
| Nils Diewald | f399a67 | 2013-11-18 17:55:22 +0000 | [diff] [blame] | 30 | |
| Nils Diewald | fb4d7b0 | 2014-04-09 17:56:17 +0000 | [diff] [blame] | 31 | // This advices the java compiler to ignore all loggings |
| 32 | public static final boolean DEBUG = false; |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 33 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 34 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 35 | public CollectionBuilder.Interface term (String field, String term) { |
| 36 | return new CollectionBuilder.Term(field, term); |
| Nils Diewald | fb4d7b0 | 2014-04-09 17:56:17 +0000 | [diff] [blame] | 37 | }; |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 38 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 39 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 40 | public CollectionBuilder.Interface re (String field, String term) { |
| 41 | return new CollectionBuilder.Term(field, term, true); |
| Nils Diewald | f399a67 | 2013-11-18 17:55:22 +0000 | [diff] [blame] | 42 | }; |
| 43 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 44 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 45 | public CollectionBuilder.Interface since (String field, String date) { |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 46 | int since = new KrillDate(date).floor(); |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 47 | |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 48 | if (since == 0 || since == KrillDate.BEGINNING) |
| 49 | return null; |
| 50 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 51 | return new CollectionBuilder.Range(field, since, KrillDate.END); |
| Nils Diewald | f399a67 | 2013-11-18 17:55:22 +0000 | [diff] [blame] | 52 | }; |
| 53 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 54 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 55 | public CollectionBuilder.Interface till (String field, String date) { |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 56 | try { |
| 57 | int till = new KrillDate(date).ceil(); |
| 58 | if (till == 0 || till == KrillDate.END) |
| 59 | return null; |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 60 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 61 | return new CollectionBuilder.Range(field, KrillDate.BEGINNING, till); |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 62 | } |
| 63 | catch (NumberFormatException e) { |
| 64 | log.warn("Parameter of till(date) is invalid"); |
| 65 | }; |
| 66 | return null; |
| Nils Diewald | f399a67 | 2013-11-18 17:55:22 +0000 | [diff] [blame] | 67 | }; |
| 68 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 69 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 70 | // This will be optimized away in future versions |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 71 | public CollectionBuilder.Interface between (String field, String start, |
| 72 | String end) { |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 73 | CollectionBuilder.Interface startObj = this.since(field, start); |
| 74 | if (startObj == null) |
| 75 | return null; |
| 76 | |
| 77 | CollectionBuilder.Interface endObj = this.till(field, end); |
| 78 | if (endObj == null) |
| 79 | return null; |
| 80 | |
| 81 | return this.andGroup().with(startObj).with(endObj); |
| 82 | }; |
| 83 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 84 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 85 | public CollectionBuilder.Interface date (String field, String date) { |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 86 | KrillDate dateDF = new KrillDate(date); |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 87 | |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 88 | if (dateDF.year == 0) |
| 89 | return null; |
| 90 | |
| 91 | if (dateDF.day == 0 || dateDF.month == 0) { |
| 92 | int begin = dateDF.floor(); |
| 93 | int end = dateDF.ceil(); |
| 94 | |
| 95 | if (end == 0 |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 96 | || (begin == KrillDate.BEGINNING && end == KrillDate.END)) |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 97 | return null; |
| 98 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 99 | return new CollectionBuilder.Range(field, begin, end); |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 100 | }; |
| 101 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 102 | return new CollectionBuilder.Range(field, dateDF.floor(), dateDF.ceil()); |
| Nils Diewald | f399a67 | 2013-11-18 17:55:22 +0000 | [diff] [blame] | 103 | }; |
| 104 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 105 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 106 | public CollectionBuilder.Group andGroup () { |
| 107 | return new CollectionBuilder.Group(false); |
| Nils Diewald | f399a67 | 2013-11-18 17:55:22 +0000 | [diff] [blame] | 108 | }; |
| 109 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 110 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 111 | public CollectionBuilder.Group orGroup () { |
| 112 | return new CollectionBuilder.Group(true); |
| Nils Diewald | f399a67 | 2013-11-18 17:55:22 +0000 | [diff] [blame] | 113 | }; |
| 114 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 115 | public interface Interface { |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 116 | public String toString (); |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 117 | |
| 118 | |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 119 | public Filter toFilter (); |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 120 | |
| 121 | |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 122 | public boolean isNegative (); |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 123 | |
| 124 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 125 | public CollectionBuilder.Interface not (); |
| Nils Diewald | baf68c5 | 2013-11-20 13:22:19 +0000 | [diff] [blame] | 126 | }; |
| Nils Diewald | f399a67 | 2013-11-18 17:55:22 +0000 | [diff] [blame] | 127 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 128 | public class Term implements CollectionBuilder.Interface { |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 129 | private boolean isNegative = false; |
| 130 | private boolean regex = false; |
| 131 | private String field; |
| 132 | private String term; |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 133 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 134 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 135 | public Term (String field, String term) { |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 136 | this.field = field; |
| 137 | this.term = term; |
| 138 | }; |
| 139 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 140 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 141 | public Term (String field, String term, boolean regex) { |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 142 | this.field = field; |
| 143 | this.term = term; |
| 144 | this.regex = regex; |
| 145 | }; |
| 146 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 147 | |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 148 | public Filter toFilter () { |
| 149 | // Regular expression |
| 150 | if (this.regex) |
| 151 | return new QueryWrapperFilter( |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 152 | new RegexpQuery(new org.apache.lucene.index.Term( |
| 153 | this.field, this.term))); |
| 154 | |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 155 | // Simple term |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 156 | return new TermsFilter(new org.apache.lucene.index.Term(this.field, |
| 157 | this.term)); |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 158 | }; |
| 159 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 160 | |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 161 | public String toString () { |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 162 | Filter filter = this.toFilter(); |
| 163 | if (filter == null) |
| 164 | return ""; |
| 165 | return filter.toString(); |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 166 | }; |
| 167 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 168 | |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 169 | public boolean isNegative () { |
| 170 | return this.isNegative; |
| 171 | }; |
| 172 | |
| 173 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 174 | public CollectionBuilder.Interface not () { |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 175 | this.isNegative = true; |
| 176 | return this; |
| 177 | }; |
| Nils Diewald | baf68c5 | 2013-11-20 13:22:19 +0000 | [diff] [blame] | 178 | }; |
| Nils Diewald | f399a67 | 2013-11-18 17:55:22 +0000 | [diff] [blame] | 179 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 180 | public class Group implements CollectionBuilder.Interface { |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 181 | private boolean isOptional = false; |
| 182 | private boolean isNegative = true; |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 183 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 184 | |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 185 | public boolean isNegative () { |
| 186 | return this.isNegative; |
| 187 | }; |
| 188 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 189 | |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 190 | public boolean isOptional () { |
| 191 | return this.isOptional; |
| 192 | }; |
| 193 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 194 | private ArrayList<CollectionBuilder.Interface> operands; |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 195 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 196 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 197 | public Group (boolean optional) { |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 198 | this.isOptional = optional; |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 199 | this.operands = new ArrayList<CollectionBuilder.Interface>(3); |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 200 | }; |
| 201 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 202 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 203 | public Group with (CollectionBuilder.Interface cb) { |
| Akron | fd05f50 | 2015-07-30 18:34:26 +0200 | [diff] [blame] | 204 | if (cb == null) |
| 205 | return this; |
| 206 | |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 207 | if (!cb.isNegative()) |
| 208 | this.isNegative = false; |
| 209 | this.operands.add(cb); |
| 210 | return this; |
| 211 | }; |
| 212 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 213 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 214 | public Group with (String field, String term) { |
| 215 | if (field == null || term == null) |
| 216 | return this; |
| 217 | return this.with(new CollectionBuilder.Term(field, term)); |
| 218 | }; |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 219 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 220 | |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 221 | public Filter toFilter () { |
| 222 | if (this.operands == null || this.operands.isEmpty()) |
| 223 | return null; |
| 224 | |
| 225 | if (this.operands.size() == 1) |
| 226 | return this.operands.get(0).toFilter(); |
| 227 | |
| 228 | // BooleanFilter bool = new BooleanFilter(); |
| 229 | BooleanGroupFilter bool = new BooleanGroupFilter(this.isOptional); |
| 230 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 231 | Iterator<CollectionBuilder.Interface> i = this.operands.iterator(); |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 232 | while (i.hasNext()) { |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 233 | CollectionBuilder.Interface cb = i.next(); |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 234 | if (cb.isNegative()) { |
| 235 | bool.without(cb.toFilter()); |
| 236 | } |
| 237 | else { |
| 238 | bool.with(cb.toFilter()); |
| 239 | }; |
| 240 | }; |
| 241 | |
| 242 | return bool; |
| 243 | }; |
| 244 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 245 | |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 246 | public String toString () { |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 247 | Filter filter = this.toFilter(); |
| 248 | if (filter == null) |
| 249 | return ""; |
| 250 | return filter.toString(); |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 251 | }; |
| 252 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 253 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 254 | public CollectionBuilder.Interface not () { |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 255 | this.isNegative = true; |
| 256 | return this; |
| 257 | }; |
| Nils Diewald | baf68c5 | 2013-11-20 13:22:19 +0000 | [diff] [blame] | 258 | }; |
| Nils Diewald | fb4d7b0 | 2014-04-09 17:56:17 +0000 | [diff] [blame] | 259 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 260 | public class Range implements CollectionBuilder.Interface { |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 261 | private boolean isNegative = false; |
| 262 | private String field; |
| 263 | private int start, end; |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 264 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 265 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 266 | public Range (String field, int start, int end) { |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 267 | this.field = field; |
| 268 | this.start = start; |
| 269 | this.end = end; |
| 270 | }; |
| Nils Diewald | fb4d7b0 | 2014-04-09 17:56:17 +0000 | [diff] [blame] | 271 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 272 | |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 273 | public boolean isNegative () { |
| 274 | return this.isNegative; |
| 275 | }; |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 276 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 277 | |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 278 | public String toString () { |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 279 | Filter filter = this.toFilter(); |
| 280 | if (filter == null) |
| 281 | return ""; |
| 282 | return filter.toString(); |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 283 | }; |
| Nils Diewald | 8db8f92 | 2014-10-24 17:43:13 +0000 | [diff] [blame] | 284 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 285 | |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 286 | public Filter toFilter () { |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 287 | return NumericRangeFilter.newIntRange(this.field, this.start, |
| 288 | this.end, true, true); |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 289 | }; |
| Nils Diewald | bb33da2 | 2015-03-04 16:24:25 +0000 | [diff] [blame] | 290 | |
| Akron | 4055017 | 2015-08-04 03:06:12 +0200 | [diff] [blame] | 291 | |
| Akron | 60dfa7e | 2015-08-03 22:15:17 +0200 | [diff] [blame] | 292 | public CollectionBuilder.Interface not () { |
| Akron | 176c9b1 | 2015-07-29 19:53:40 +0200 | [diff] [blame] | 293 | this.isNegative = true; |
| 294 | return this; |
| 295 | }; |
| Nils Diewald | fb4d7b0 | 2014-04-09 17:56:17 +0000 | [diff] [blame] | 296 | }; |
| Nils Diewald | f399a67 | 2013-11-18 17:55:22 +0000 | [diff] [blame] | 297 | }; |