testdata for IDEA-133920

This commit is contained in:
Anna Kozlova
2015-09-03 16:51:35 +03:00
parent 8f4768f3b3
commit eb638c67d7
2 changed files with 44 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
import java.util.HashMap;
import java.util.Map;
import static java.util.Collections.singletonMap;
class Main {
public static void main(String[] args) {
final Builder<Object, Object> builder = new Builder<>();
String appName = "asdf";
Map query = builder
.put("size", 0)
.put("query", singletonMap("bool",
singletonMap("must",
of(singletonMap("term", singletonMap("type.raw", appName)),
singletonMap("range", singletonMap("@timestamp", of("gt", "2014-12-01")))))))
.build();
System.out.println(query);
}
public static <K, V> Map<K, V> of(K k1, V v1) {
return null;
}
static class Builder<K, V> {
public Builder<K, V> put(K key, V value) {
return this;
}
public HashMap<K, V> build() {
return null;
}
}
}